mirror of
git://soft.sys114.com/WiringPi2-Python
synced 2025-12-19 01:28:43 +09:00
Fix PyFunc typemap.
This commit is contained in:
committed by
Yang Deokgyu
parent
a550376c6e
commit
8de6c99b90
@@ -59,12 +59,12 @@
|
||||
};
|
||||
|
||||
// Grab a Python function object as a Python object.
|
||||
%typemap(in) PyObject *pyfunc {
|
||||
if (!PyCallable_Check($1)) {
|
||||
%typemap(in) PyObject *PyFunc {
|
||||
if (!PyCallable_Check($input)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Need a callable object!");
|
||||
return NULL;
|
||||
}
|
||||
$1 = $2;
|
||||
$1 = $input;
|
||||
}
|
||||
|
||||
%{
|
||||
|
||||
Reference in New Issue
Block a user