summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 231a9c1..e8ad486 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -288,7 +288,7 @@ _PyFunction_LookupByVersion(uint32_t version)
PyFunctionObject *func = interp->func_state.func_version_cache[
version % FUNC_VERSION_CACHE_SIZE];
if (func != NULL && func->func_version == version) {
- return (PyFunctionObject *)Py_NewRef(func);
+ return func;
}
return NULL;
}