[Bf-python] Ipo fix compile prob

Joseph Gilbert models at paposo.com
Mon Jan 19 11:15:18 CET 2004


Hi,

Just to let you know :) MSVC doesn't like declarations of variables inside
of a function for some reason and it complains.  Case in point:

static PyObject *Ipo_addCurve(BPy_Ipo *self, PyObject *args)
{
	IpoCurve *get_ipocurve(ID *from, short type, int adrcode, Ipo *useipo);
      ....
 	Link		* link;

.....
	/* insertkey demande un pointeur sur l'objet pour lequel on veut ajouter
		 une courbe IPO*/
	struct Object	* object;  <<<<<<<<<<<<<<<<<-------- declaration of var
inside function Crashes MSVC compile
	link = G.main->object.first;
......

If you change this to:
static PyObject *Ipo_addCurve(BPy_Ipo *self, PyObject *args)
{
	IpoCurve *get_ipocurve(ID *from, short type, int adrcode, Ipo *useipo);
      ....
 	Link		* link;
      struct Object	* object; <<<<<----declared with the rest

.....
	/* insertkey demande un pointeur sur l'objet pour lequel on veut ajouter
		 une courbe IPO*/
	link = G.main->object.first;
......

I don't have any problems like this.  Not sure why this is though. :)




More information about the Bf-python mailing list