diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 19:19:51 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-08-03 19:19:51 +0400 |
commit | ff110c17f705976435ee14f2cde9c85f7334a56c (patch) | |
tree | b1748338ca9489ddef1a61ff923b46438ed937ce /source/blender/freestyle/intern/python/UnaryFunction0D | |
parent | d4ff63fe20d912a72a7695852a204ab3f1d3dce7 (diff) |
Fixed argument checking in __init__ methods of Interface1D, Predicates,
Functions, and StrokeShader types.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D')
10 files changed, 40 insertions, 20 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 20455f8332c..7973a87c3fa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -23,7 +23,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DDouble instance -----------*/ -static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self); +static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self); static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self); @@ -188,8 +188,10 @@ PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self) +int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_double = new UnaryFunction0D<double>(); self->uf0D_double->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 87891af6a07..6bc5df27824 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DEdgeNature instance -----------*/ -static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self); +static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* self); static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DEdgeNature_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self) +int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_edgenature = new UnaryFunction0D<Nature::EdgeNature>(); self->uf0D_edgenature->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 74999d70d28..e837135bc0b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -17,7 +17,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DFloat instance -----------*/ -static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self); +static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self); static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self); @@ -160,8 +160,10 @@ PyMODINIT_FUNC UnaryFunction0DFloat_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self) +int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_float = new UnaryFunction0D<float>(); self->uf0D_float->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 9f319bd09dd..24df5652017 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DId instance -----------*/ -static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self); +static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self); static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DId_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self) +int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_id = new UnaryFunction0D<Id>(); self->uf0D_id->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index a86580b5d42..41322c5cdad 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DMaterial instance -----------*/ -static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self); +static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* self); static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DMaterial_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self) +int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_material = new UnaryFunction0D<FrsMaterial>(); self->uf0D_material->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 08d10d2be39..b041fba1e11 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DUnsigned instance -----------*/ -static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self); +static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* self); static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DUnsigned_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self) +int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_unsigned = new UnaryFunction0D<unsigned int>(); self->uf0D_unsigned->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 6dc2aa52a78..c6f01d22d14 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -13,7 +13,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVec2f instance -----------*/ -static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self); +static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self); static PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self); @@ -137,8 +137,10 @@ PyMODINIT_FUNC UnaryFunction0DVec2f_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self) +int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vec2f = new UnaryFunction0D<Vec2f>(); self->uf0D_vec2f->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index 7f2c78f8d00..2949ab8c6cd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVec3f instance -----------*/ -static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self); +static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self); static PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DVec3f_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self) +int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vec3f = new UnaryFunction0D<Vec3f>(); self->uf0D_vec3f->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index dd1854b86d8..74c8a9b9718 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -12,7 +12,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DVectorViewShape instance -----------*/ -static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self); +static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape* self); static PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self); @@ -131,8 +131,10 @@ PyMODINIT_FUNC UnaryFunction0DVectorViewShape_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self) +int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_vectorviewshape = new UnaryFunction0D< std::vector<ViewShape*> >(); self->uf0D_vectorviewshape->py_uf0D = (PyObject *)self; return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 7a1aeed0e72..64c7dfe401c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -13,7 +13,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0DViewShape instance -----------*/ -static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self); +static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, PyObject *args, PyObject *kwds); static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* self); static PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self); @@ -137,8 +137,10 @@ PyMODINIT_FUNC UnaryFunction0DViewShape_Init( PyObject *module ) { //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self) +int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self, PyObject *args, PyObject *kwds) { + if ( !PyArg_ParseTuple(args, "") ) + return -1; self->uf0D_viewshape = new UnaryFunction0D<ViewShape*>(); self->uf0D_viewshape->py_uf0D = (PyObject *)self; return 0; |