Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-12-27 08:04:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-12-27 08:04:20 +0300
commit9afe662c125fec5cf62b3976bf32194838f0d740 (patch)
tree97fc847b9379eef836801dcafad0cd92e38cb371 /source/blender/python/api2_2x/Text.c
parented2f161c72722b90a1c4e15f998ca678b79e94b0 (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/Text.c')
-rw-r--r--source/blender/python/api2_2x/Text.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c
index b5a5f7cf21d..ddfb1b0044f 100644
--- a/source/blender/python/api2_2x/Text.c
+++ b/source/blender/python/api2_2x/Text.c
@@ -342,8 +342,7 @@ static PyObject *M_Text_unlink( PyObject * self, PyObject * args )
( ( BPy_Text * ) textobj )->text = NULL;
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
/*****************************************************************************/
@@ -437,18 +436,14 @@ static PyObject *Text_getNLines( BPy_Text * self )
static PyObject *Text_setName( BPy_Text * self, PyObject * args )
{
char *name;
- char buf[21];
if( !PyArg_ParseTuple( args, "s", &name ) )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected string argument" ) );
- PyOS_snprintf( buf, sizeof( buf ), "%s", name );
-
- rename_id( &self->text->id, buf );
+ rename_id( &self->text->id, name );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Text_clear( BPy_Text * self)
@@ -465,8 +460,7 @@ static PyObject *Text_clear( BPy_Text * self)
txt_cut_sel( self->text );
txt_set_undostate( oldstate );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Text_set( BPy_Text * self, PyObject * args )
@@ -485,8 +479,7 @@ static PyObject *Text_set( BPy_Text * self, PyObject * args )
self->text->flags &= EXPP_TEXT_MODE_FOLLOW;
}
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Text_write( BPy_Text * self, PyObject * args )
@@ -507,8 +500,7 @@ static PyObject *Text_write( BPy_Text * self, PyObject * args )
txt_move_eof( self->text, 0 );
txt_set_undostate( oldstate );
- Py_INCREF( Py_None );
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *Text_asLines( BPy_Text * self )