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:
@@ -44,11 +44,7 @@ struct _gpio {
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
int pin; /**< the pin number, as known to the os. */
|
int pin; /**< the pin number, as known to the os. */
|
||||||
int value_fp; /**< the file pointer to the value of the gpio */
|
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 */
|
void (* isr)(); /**< the interupt service request */
|
||||||
#endif
|
|
||||||
pthread_t thread_id; /**< the isr handler thread id */
|
pthread_t thread_id; /**< the isr handler thread id */
|
||||||
int isr_value_fp; /**< the isr file pointer on the value */
|
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
|
// if we do not hold a lock on the GIL
|
||||||
PyGILState_STATE gilstate = PyGILState_Ensure();
|
PyGILState_STATE gilstate = PyGILState_Ensure();
|
||||||
|
|
||||||
PyEval_CallObject(dev->isr, NULL);
|
PyEval_CallObject((PyObject*)dev->isr, NULL);
|
||||||
|
|
||||||
PyGILState_Release (gilstate);
|
PyGILState_Release (gilstate);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user