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:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-06-12 09:54:15 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2005-06-12 09:54:15 +0400
commit3d4438dcd76d74b47daba6c8a1ab2683ba6db123 (patch)
tree48b663807ce3f0db0260f9b3d4dbccb59e9ddfb3 /source/blender/python/api2_2x/Text3d.c
parent70c9f9b319bc3b510cf7c1654835ab166e821ecb (diff)
Scripts:
- Campbell Barton updated his Wavefront obj importer; - Jean-Michel Soler updated his paths import (eps part). BPython bug fixes: - oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c): http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127 - Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch: http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127 - doc updates (suggested by Campbell) Thanks guys.
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r--source/blender/python/api2_2x/Text3d.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c
index e9a957648fe..1f717281117 100644
--- a/source/blender/python/api2_2x/Text3d.c
+++ b/source/blender/python/api2_2x/Text3d.c
@@ -491,11 +491,12 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args )
if( !PyArg_ParseTuple( args, "s", &text ) )
return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
"expected string argument" ) );
- if (self) {
- MEM_freeN (self->curve->str);
- self->curve->str= MEM_mallocN (strlen (text)+1, "str");
- strcpy (self->curve->str, text);
- self->curve->pos= strlen (text);
+ if( self ) {
+ MEM_freeN( self->curve->str );
+ self->curve->str = MEM_mallocN( strlen (text)+1, "str" );
+ strcpy( self->curve->str, text );
+ self->curve->pos = strlen ( text );
+ self->curve->len = strlen ( text );
}
Py_INCREF( Py_None );
return Py_None;