Parcourir la source

[1245] adjusted the python wrapper template so it works with the change
of the assumption on @CPPCLASS@Container constructor (it's now explicit)

JINMEI Tatuya il y a 13 ans
Parent
commit
433f29fd44
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/lib/util/python/wrapper_template.cc

+ 2 - 2
src/lib/util/python/wrapper_template.cc

@@ -299,8 +299,8 @@ initModulePart_@CPPCLASS@(PyObject* mod) {
 
 PyObject*
 create@CPPCLASS@Object(const @CPPCLASS@& source) {
-    @CPPCLASS@Container container =
-        PyObject_New(s_@CPPCLASS@, &@cppclass@_type);
+    @CPPCLASS@Container container(PyObject_New(s_@CPPCLASS@,
+                                               &@cppclass@_type));
     container.set(new @CPPCLASS@(source));
     return (container.release());
 }