From bf0365ceb0140a9127f59ff6bc1a0a9c113e0a1a Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Tue, 28 Jul 2009 00:29:30 +0000 Subject: * BPy_IntegrationType.cpp: Added a Python wrapper of integrate function. * Fixed uninitialized fields in the "__init__" methods of UnaryFunction0D types. Also added missing argument validation codes to some of the types, and removed redundant validation error messages. --- .../python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp') diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp index 2ca5f7899f9..2c58cad73bb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for ShapeIdF0D instance -----------*/ - static int ShapeIdF0D___init__(BPy_ShapeIdF0D* self); + static int ShapeIdF0D___init__(BPy_ShapeIdF0D* self, PyObject *args); /*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/ @@ -98,9 +98,12 @@ PyTypeObject ShapeIdF0D_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int ShapeIdF0D___init__( BPy_ShapeIdF0D* self ) +int ShapeIdF0D___init__( BPy_ShapeIdF0D* self, PyObject *args ) { + if( !PyArg_ParseTuple(args, "") ) + return -1; self->py_uf0D_id.uf0D_id = new Functions0D::ShapeIdF0D(); + self->py_uf0D_id.uf0D_id->py_uf0D = (PyObject *)self; return 0; } -- cgit v1.2.3