Update of /cvsroot/python-gtkextra/python-gtkextra/gtkextra
In directory usw-pr-cvs1:/tmp/cvs-serv2343
Modified Files:
gtkplotdata-support.c
Log Message:
The arguments of the plot functions are now set with standard Python
functions since the hack used before could cause trouble.
Index: gtkplotdata-support.c
===================================================================
RCS file: /cvsroot/python-gtkextra/python-gtkextra/gtkextra/gtkplotdata-support.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gtkplotdata-support.c 2002/01/03 22:44:04 1.2
--- gtkplotdata-support.c 2002/01/04 13:21:58 1.3
***************
*** 204,215 ****
/* Put the X value into the first item of the argument tuple. */
- /*
value = PyFloat_FromDouble(x);
if (!value)
goto cleanup;
PyTuple_SetItem(args, 0, value);
- */
- value = PyTuple_GET_ITEM(args, 0);
- ((PyFloatObject *) value)->ob_fval = x;
/* Call the Python function. */
--- 204,211 ----
***************
*** 271,275 ****
/* Put the X and Y value into the first two items of the argument tuple. */
- /*
value = PyFloat_FromDouble(x);
if (!value)
--- 267,270 ----
***************
*** 280,288 ****
goto cleanup;
PyTuple_SetItem(args, 1, value);
- */
- value = PyTuple_GET_ITEM(args, 0);
- ((PyFloatObject *) value)->ob_fval = x;
- value = PyTuple_GET_ITEM(args, 1);
- ((PyFloatObject *) value)->ob_fval = y;
/* Call the Python function. */
--- 275,278 ----
***************
*** 350,361 ****
/* Put the index into the first item of the argument tuple. */
- /*
value = PyInt_FromLong(iter);
if (!value)
goto cleanup;
PyTuple_SetItem(args, 0, value);
- */
- value = PyTuple_GET_ITEM(args, 0);
- ((PyIntObject *) value)->ob_ival = iter;
/* Call the Python function. */
--- 340,347 ----
|