Mercurial > vim
comparison src/if_py_both.h @ 5525:3fbda56bb200 v7.4.111
updated for version 7.4.111
Problem: Memory leak in Python OptionsAssItem. (Ken Takata)
Solution: Call Py_XDECREF() where needed. (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 07 Dec 2013 14:28:43 +0100 |
parents | 064e2a080e2e |
children | 2ca470c6096e |
comparison
equal
deleted
inserted
replaced
5524:486655e0c5a2 | 5525:3fbda56bb200 |
---|---|
3003 self->opt_type, self->from); | 3003 self->opt_type, self->from); |
3004 } | 3004 } |
3005 else | 3005 else |
3006 { | 3006 { |
3007 char_u *val; | 3007 char_u *val; |
3008 PyObject *todecref; | 3008 PyObject *todecref2; |
3009 | 3009 |
3010 if ((val = StringToChars(valObject, &todecref))) | 3010 if ((val = StringToChars(valObject, &todecref2))) |
3011 { | |
3011 ret = set_option_value_for(key, 0, val, opt_flags, | 3012 ret = set_option_value_for(key, 0, val, opt_flags, |
3012 self->opt_type, self->from); | 3013 self->opt_type, self->from); |
3014 Py_XDECREF(todecref2); | |
3015 } | |
3013 else | 3016 else |
3014 ret = -1; | 3017 ret = -1; |
3015 } | 3018 } |
3016 | 3019 |
3017 Py_XDECREF(todecref); | 3020 Py_XDECREF(todecref); |