Browse 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 13 years ago
parent
commit
433f29fd44
1 changed files with 2 additions and 2 deletions
  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*
 PyObject*
 create@CPPCLASS@Object(const @CPPCLASS@& source) {
 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));
     container.set(new @CPPCLASS@(source));
     return (container.release());
     return (container.release());
 }
 }