Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
_PyFunction_LookupByVersion returns a borrowed ref
  • Loading branch information
brandtbucher committed Oct 10, 2023
commit da57eed349d43d00e0fdb49a5c953c8d4b69f28d
2 changes: 1 addition & 1 deletion Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down