Search found 3 matches
- Fri Jun 17, 2016 11:09 am
- Forum: Programs, Libraries and Tools
- Topic: Return custom struct from c issue [ffi]
- Replies: 0
- Views: 4750
Return custom struct from c issue [ffi]
Here is a c demo lib: #include <stdio.h> struct s { int a; }; struct s getss(void) { struct s ss; ss.a = 1; printf("return ss.\n"); return ss; } involve in micropython: import uctypes,ffi l = ffi.open('./liba.so') gs = l.func('p', 'getss', 'v') gs(None) got Segmentation fault: return ss. [ 3442.7828...
- Tue Jun 14, 2016 11:33 am
- Forum: Programs, Libraries and Tools
- Topic: how to handle callback and struct in ffi mod ?
- Replies: 1
- Views: 3129
how to handle callback and struct in ffi mod ?
[unix branch on mipsel arch] I need to involve some method from a .so file, say libevent.so, but there's no guide to handle " typedef struct" as a parameter, here's my code snippet: ----------------------------------------------------------------------------- import ffi eventLib = ffi.open('libevent...
- Mon Mar 07, 2016 4:39 pm
- Forum: ESP8266 boards
- Topic: Online Documentation
- Replies: 12
- Views: 11295
Re: Online Documentation
Is there will be a separated domain name for this? it's hard to find .