From 92df196408e34aa41eab44fea9f79a5514b4d962 Mon Sep 17 00:00:00 2001 From: Jake Cobb Date: Thu, 19 Apr 2018 10:32:11 -0400 Subject: [PATCH] Python: Use PyObject_SetAttr instead of PyObject_GenericSetAttr for back-ref --- Lib/python/pycontainer.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg index 18e1f3265..f77c7cb34 100644 --- a/Lib/python/pycontainer.swg +++ b/Lib/python/pycontainer.swg @@ -49,7 +49,7 @@ namespace swig { static PyObject* attr = SWIG_Python_str_FromChar("__owner"); SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child); if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) { - PyObject_GenericSetAttr(child, attr, owner); + PyObject_SetAttr(child, attr, owner); return true; } return false;