summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-01 16:27:23 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-01 16:27:23 +0200
commit2d3d60a7d4b410668dfc427120205ccf88789db4 (patch)
tree23a6593069c537b5aad86524d01dac54668768e5 /src/if_py_both.h
parent437bafe4c8a83ed71ee006eda7f54b65a90f0d4c (diff)
downloadvim-git-2d3d60a7d4b410668dfc427120205ccf88789db4.tar.gz
patch 7.4.2138v7.4.2138
Problem: Test 86 and 87 fail. Solution: Call func_ref() also for regular functions.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 4f916b797..35ad5d03c 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -2863,7 +2863,6 @@ FunctionNew(PyTypeObject *subtype, char_u *name, int argc, typval_T *argv,
return NULL;
}
self->name = vim_strsave(name);
- func_ref(self->name);
}
else
if ((self->name = get_expanded_name(name,
@@ -2875,6 +2874,7 @@ FunctionNew(PyTypeObject *subtype, char_u *name, int argc, typval_T *argv,
return NULL;
}
+ func_ref(self->name);
self->argc = argc;
self->argv = argv;
self->self = selfdict;