Skip to content

Fix compile error reported by gcc 10 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
4 changes: 2 additions & 2 deletions source/py_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions source/py_gpio_RPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down