diff --git a/README.md b/README.md index bc96b8b..d0450ed 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ git clone https://github.com/TinkerBoard/gpio_lib_python.git sudo apt-get install python-dev python2.7-dev python3-dev\ cd ASUS_GPIO_PYTHON_PATH/gpio/\ sudo python setup.py install + * if encounter multiple definition error, use + `CFLAGS="-fcommon" python setup.py install` #A Simple Python Program\ import ASUS.GPIO as GPIO\ diff --git a/source/py_gpio.c b/source/py_gpio.c index 545f10c..97fe3ee 100644 --- a/source/py_gpio.c +++ b/source/py_gpio.c @@ -280,11 +280,11 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar return NULL; chanlist = NULL; } - else if PyList_Check(chanlist) + else if (PyList_Check(chanlist)) { // do nothing } - else if PyTuple_Check(chanlist) + else if (PyTuple_Check(chanlist)) { chantuple = chanlist; chanlist = NULL; diff --git a/source/py_gpio_RPi.c b/source/py_gpio_RPi.c index a1c739c..527d98b 100644 --- a/source/py_gpio_RPi.c +++ b/source/py_gpio_RPi.c @@ -273,11 +273,11 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar return NULL; chanlist = NULL; } - else if PyList_Check(chanlist) + else if (PyList_Check(chanlist)) { // do nothing } - else if PyTuple_Check(chanlist) + else if (PyTuple_Check(chanlist)) { chantuple = chanlist; chanlist = NULL;