diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-09-30 18:14:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-09-30 18:14:49 +0400 |
commit | 32b1e2383bf50ebe30c26618496ec966620d1d23 (patch) | |
tree | 373e50c9d290f46ba33096821cf17ba54003d8ed /source/blender/python/api2_2x/Draw.c | |
parent | 8e7b4039247419a34093b06b5a05c2423d2cab05 (diff) |
3rd attempt to commit, metaball fixes and small vector optimization
Diffstat (limited to 'source/blender/python/api2_2x/Draw.c')
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index d2a1331d4eb..9728d8ec5b0 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -384,11 +384,11 @@ static PyObject *Button_getattr( PyObject * self, char *name ) if( strcmp( name, "val" ) == 0 ) { if( but->type == BINT_TYPE ) - return Py_BuildValue( "i", but->val.asint ); + return PyInt_FromLong( but->val.asint ); else if( but->type == BFLOAT_TYPE ) - return Py_BuildValue( "f", but->val.asfloat ); + return PyFloat_FromDouble( but->val.asfloat ); else if( but->type == BSTRING_TYPE ) - return Py_BuildValue( "s", but->val.asstr ); + return PyString_FromString( but->val.asstr ); else if( but->type == BVECTOR_TYPE ) return Py_BuildValue( "fff", but->val.asvec[0], but->val.asvec[1], but->val.asvec[2] ); } @@ -1391,7 +1391,7 @@ static PyObject *Method_PupStrInput( PyObject * self, PyObject * args ) return Py_None; } - ret = Py_BuildValue( "s", tmp ); + ret = PyString_FromString( tmp ); if( ret ) return ret; |