diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-06-16 17:17:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-06-16 17:17:41 +0400 |
commit | 84749aa3ff39af08cdccfea462fb4a6a266ca7b8 (patch) | |
tree | 63954fcd3eb073fe8e057974f750c641b6d17bfd /source/blender/python/api2_2x/Text3d.c | |
parent | 3e490c020324dcd4d7a3a3acd62f48d3fd781afc (diff) |
Python API, more METH_VARARGS to METH_O
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index 695f84728c7..6ac6f61cbd5 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -102,7 +102,7 @@ static int Text3d_compare( BPy_Text3d * a, BPy_Text3d * b ); /*PyObject *Text3d_getType(BPy_Text3d *self);*/ static PyObject *Text3d_getName( BPy_Text3d * self ); static PyObject *Text3d_setName( BPy_Text3d * self, PyObject * args ); -static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args ); +static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * value ); static PyObject *Text3d_getText( BPy_Text3d * self ); static PyObject *Text3d_getDrawMode( BPy_Text3d * self ); static PyObject *Text3d_setDrawMode( BPy_Text3d * self, PyObject * args ); @@ -664,11 +664,11 @@ static PyObject *Text3d_setName( BPy_Text3d * self, PyObject * args ) return Curve_setName( (BPy_Curve*)self,args ); } -static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args ) +static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * value ) { - char *text; + char *text = PyString_AsString(value); - if( !PyArg_ParseTuple( args, "s", &text ) ) + if( !text ) return EXPP_ReturnPyObjError( PyExc_AttributeError, "expected string argument" ); |