Hi all,
I'm learning how to use rffi and lltype system to access external C
library in RPython. And in some case, I need to store RPython object in
external C array. For example:
class RPythonObj:
def test(): return 1
.... ....
c_source=py.code.Source("
void*store=NULL;
void c_call_set(???){
store=???;
}
??? c_call_get(){
return store;
}")
_c_call_set=llexternal("c_call_set", [???], lltype.Void, ...)
_c_call_get=llexternal("c_call_get", [], ???, ...)
def test():
o=RPythonObj()
_c_call_set(o)
o2=_c_call_get()
o2.test()
Is that possible? If so, what should I put in ???
Thanks very much~
--
Lv Qi
Ph.D Candidate
CS Department
Nanjing University
Nanjing 210093
China
Tel: 86-138-5228-2381
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev