|
From: Andre R. <and...@us...> - 2004-11-30 10:48:18
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9163 Modified Files: Tag: sidewinder-branch langpython.c Log Message: Fixed a few Visual C++ compiler errors related to variables not being defined at the beginning of a block of code. Index: langpython.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langpython.c,v retrieving revision 1.2.4.24 retrieving revision 1.2.4.25 diff -C2 -d -r1.2.4.24 -r1.2.4.25 *** langpython.c 29 Nov 2004 07:04:15 -0000 1.2.4.24 --- langpython.c 30 Nov 2004 10:48:05 -0000 1.2.4.25 *************** *** 1544,1550 **** newTableObject(hdlhashtable hdl) { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "Table"); ! frontier_TableObject *obj = PyObject_New(frontier_TableObject, (PyTypeObject *)class); obj->table = hdl; --- 1544,1551 ---- newTableObject(hdlhashtable hdl) { PyObject *class; ! frontier_TableObject *obj; ! class = PyObject_GetAttrString(frontierModule, "Table"); ! obj = PyObject_New(frontier_TableObject, (PyTypeObject *)class); obj->table = hdl; *************** *** 1555,1561 **** newOutlineObject() { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "Outline"); ! frontier_OutlineObject *obj = PyObject_New(frontier_OutlineObject, (PyTypeObject *)class); return (PyObject *)obj; --- 1556,1563 ---- newOutlineObject() { PyObject *class; ! frontier_OutlineObject *obj; ! class = PyObject_GetAttrString(frontierModule, "Outline"); ! obj = PyObject_New(frontier_OutlineObject, (PyTypeObject *)class); return (PyObject *)obj; *************** *** 1565,1571 **** newWPTextObject() { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "WPText"); ! frontier_WPTextObject *obj = PyObject_New(frontier_WPTextObject, (PyTypeObject *)class); return (PyObject *)obj; --- 1567,1574 ---- newWPTextObject() { PyObject *class; ! frontier_WPTextObject *obj; ! class = PyObject_GetAttrString(frontierModule, "WPText"); ! obj = PyObject_New(frontier_WPTextObject, (PyTypeObject *)class); return (PyObject *)obj; *************** *** 1575,1581 **** newScriptObject() { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "Script"); ! frontier_ScriptObject *obj = PyObject_New(frontier_ScriptObject, (PyTypeObject *)class); return (PyObject *)obj; --- 1578,1585 ---- newScriptObject() { PyObject *class; ! frontier_ScriptObject *obj; ! class = PyObject_GetAttrString(frontierModule, "Script"); ! obj = PyObject_New(frontier_ScriptObject, (PyTypeObject *)class); return (PyObject *)obj; *************** *** 1585,1591 **** newInternalValueObject(tyvaluetype vt) { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "InternalValue"); ! frontier_InternalValue *obj = PyObject_New(frontier_InternalValue, (PyTypeObject *)class); obj->vartype = vt; --- 1589,1596 ---- newInternalValueObject(tyvaluetype vt) { PyObject *class; ! frontier_InternalValue *obj; ! class = PyObject_GetAttrString(frontierModule, "InternalValue"); ! obj = PyObject_New(frontier_InternalValue, (PyTypeObject *)class); obj->vartype = vt; *************** *** 1596,1602 **** newExternalValueObject(tyexternalid ei) { PyObject *class; ! class = PyObject_GetAttrString(frontierModule, "ExternalValue"); ! frontier_ExternalValue *obj = PyObject_New(frontier_ExternalValue, (PyTypeObject *)class); obj->extvartype = ei; --- 1601,1608 ---- newExternalValueObject(tyexternalid ei) { PyObject *class; ! frontier_ExternalValue *obj; ! class = PyObject_GetAttrString(frontierModule, "ExternalValue"); ! obj = PyObject_New(frontier_ExternalValue, (PyTypeObject *)class); obj->extvartype = ei; *************** *** 1726,1730 **** convertreturns(Handle htext) { int len = gethandlesize(htext); ! for (int i = 0; i < len; i++) if ((*htext)[i] == '\r') (*htext)[i] = '\n'; --- 1732,1737 ---- convertreturns(Handle htext) { int len = gethandlesize(htext); ! int i; ! for (i = 0; i < len; i++) if ((*htext)[i] == '\r') (*htext)[i] = '\n'; |