diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-27 08:04:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-27 08:04:20 +0300 |
commit | 9afe662c125fec5cf62b3976bf32194838f0d740 (patch) | |
tree | 97fc847b9379eef836801dcafad0cd92e38cb371 /source/blender/python/api2_2x/Font.c | |
parent | ed2f161c72722b90a1c4e15f998ca678b79e94b0 (diff) |
renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id()
some other minor changed- use None returning maro
Diffstat (limited to 'source/blender/python/api2_2x/Font.c')
-rw-r--r-- | source/blender/python/api2_2x/Font.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Font.c b/source/blender/python/api2_2x/Font.c index b4f37332523..bb9b700727a 100644 --- a/source/blender/python/api2_2x/Font.c +++ b/source/blender/python/api2_2x/Font.c @@ -170,7 +170,7 @@ PyObject *M_Font_Load( PyObject * self, PyObject * args ) Py_DECREF (tmp); } else - return EXPP_incr_ret( Py_None ); + Py_RETURN_NONE; return ( PyObject * ) py_font; } @@ -207,7 +207,6 @@ static PyObject *Font_getFilename( BPy_Font * self ) static int Font_setName( BPy_Font * self, PyObject * value ) { char *name = NULL; - char buf[21]; if( !(self->font) ) return EXPP_ReturnIntError( PyExc_RuntimeError, @@ -218,10 +217,8 @@ static int Font_setName( BPy_Font * self, PyObject * value ) return EXPP_ReturnIntError( PyExc_TypeError, "expected string argument" ); - PyOS_snprintf( buf, sizeof( buf ), "%s", name ); + rename_id( &self->font->id, name ); - rename_id( &self->font->id, buf ); - return 0; } @@ -250,7 +247,7 @@ static PyObject *Font_pack( BPy_Font * self ) { if( !self->font->packedfile ) self->font->packedfile = newPackedFile(self->font->name); - return EXPP_incr_ret( Py_None ); + Py_RETURN_NONE; } /*--------------- BPy_Font.unpack()---------------------------------*/ @@ -269,7 +266,7 @@ static PyObject *Font_unpack( BPy_Font * self, PyObject * args ) return EXPP_ReturnPyObjError( PyExc_RuntimeError, "error unpacking font" ); - return EXPP_incr_ret( Py_None ); + Py_RETURN_NONE; } /*--------------- BPy_Font.packed---------------------------------*/ |