Private
Public Access
2
0

gpio.c: PyEval_Call now casts void* to PyObject* before call, fixing warning

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-19 10:35:29 +01:00
parent adcefeaba1
commit 3d10fc1c0d

View File

@@ -44,11 +44,7 @@ struct _gpio {
/*@{*/
int pin; /**< the pin number, as known to the os. */
int value_fp; /**< the file pointer to the value of the gpio */
#ifdef SWIGPYTHON
PyObject *isr; /**< the interupt service request */
#else
void (* isr)(); /**< the interupt service request */
#endif
pthread_t thread_id; /**< the isr handler thread id */
int isr_value_fp; /**< the isr file pointer on the value */
/*@}*/
@@ -154,7 +150,7 @@ maa_gpio_interrupt_handler(void* arg)
// if we do not hold a lock on the GIL
PyGILState_STATE gilstate = PyGILState_Ensure();
PyEval_CallObject(dev->isr, NULL);
PyEval_CallObject((PyObject*)dev->isr, NULL);
PyGILState_Release (gilstate);
#else