-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Hi,
i have a python-ctypes-c program that run well at ubuntu and i port it to the android based on 'python-for-android'. but i get SIGSEGV when the program call back from C to python.
- my python code:
def py_cb(p1):
print("just cb")
module = load_library("xxxx.so")
CFUN = CFUNCTYPE(None, c_int)
cb = CFUN(py_cb)
module.test_cb(cb)
- my c code:
typedef void (*py_cb)(int p1);
const void test_cb(py_cb cb)
{
cb(1)
}
can anyone help? many thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels