From a223e9f055d4f43d3a318a4c823c86f138560b0c Mon Sep 17 00:00:00 2001 From: Michel Selten Date: Mon, 21 Jul 2003 17:35:19 +0000 Subject: * Fix small compilation problem in Ipo.c Moved the declaration of a variable to the beginning of a function. --- source/blender/python/api2_2x/Ipo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c index 45173c55bc6..9673a1ae44e 100644 --- a/source/blender/python/api2_2x/Ipo.c +++ b/source/blender/python/api2_2x/Ipo.c @@ -269,11 +269,12 @@ static PyObject *Ipo_getNcurves(C_Ipo *self) static PyObject *Ipo_addCurve(C_Ipo *self, PyObject *args) { void *MEM_callocN(unsigned int len, char *str); - + IpoCurve *ptr; int i = 0,typenumber = -1; char*type = 0; static char *name="mmm"; char * nametab[24] = {"LocX","LocY","LocZ","dLocX","dLocY","dLocZ","RotX","RotY","RotZ","dRotX","dRotY","dRotZ","SizeX","SizeY","SizeZ","dSizeX","dSizeY","dSizeZ","Layer","Time","ColR","ColG","ColB","ColA"}; + if (!PyArg_ParseTuple(args, "s",&type)) return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected string argument")); for(i = 0;i<24;i++) @@ -283,7 +284,7 @@ static PyObject *Ipo_addCurve(C_Ipo *self, PyObject *args) if (typenumber == -1) return (EXPP_ReturnPyObjError (PyExc_TypeError, "unknown type")); - IpoCurve*ptr = (IpoCurve*)MEM_callocN(sizeof(IpoCurve),name); + ptr = (IpoCurve*)MEM_callocN(sizeof(IpoCurve),name); ptr->blocktype = 16975; ptr->totvert = 0; ptr->adrcode = typenumber; -- cgit v1.2.3