Re: [pypy-dev] rffi feature request

2007-08-11 Thread Antonio Cuni
Simon Burton wrote: I would like to expose some functions as external symbols when i build a .so def foo(i, j): return i+j foo._expose_ = [rffi.INT, rffi.INT] well, the above code would produce: extern int foo(int i, int j) { return i+j; } (and perhaps an

Re: [pypy-dev] rffi feature request

2007-08-10 Thread Maciek Fijalkowski
well, the above code would produce: extern int foo(int i, int j) { return i+j; } (and perhaps an accompanying .h file) thereby providing an interface for other C programs. This is rffi producing rather than consuming a C interface. Simon. Hey Simon. It's doable, and not

Re: [pypy-dev] rffi feature request

2007-08-08 Thread Simon Burton
On Tue, 07 Aug 2007 14:15:48 +0200 Maciek Fijalkowski [EMAIL PROTECTED] wrote: Simon Burton wrote: On Fri, 3 Aug 2007 12:14:13 -0700 Simon Burton [EMAIL PROTECTED] wrote: I would like to expose some functions as external symbols when i build a .so def foo(i, j): return

Re: [pypy-dev] rffi feature request

2007-08-07 Thread Maciek Fijalkowski
Simon Burton wrote: On Fri, 3 Aug 2007 12:14:13 -0700 Simon Burton [EMAIL PROTECTED] wrote: I would like to expose some functions as external symbols when i build a .so def foo(i, j): return i+j foo._expose_ = [rffi.INT, rffi.INT] It seems like this could also enable a

Re: [pypy-dev] rffi feature request

2007-08-04 Thread Simon Burton
On Fri, 3 Aug 2007 12:14:13 -0700 Simon Burton [EMAIL PROTECTED] wrote: I would like to expose some functions as external symbols when i build a .so def foo(i, j): return i+j foo._expose_ = [rffi.INT, rffi.INT] It seems like this could also enable a plugin system for rpython, and

[pypy-dev] rffi feature request

2007-08-03 Thread Simon Burton
I would like to expose some functions as external symbols when i build a .so def foo(i, j): return i+j foo._expose_ = [rffi.INT, rffi.INT] This is basically so I can write cpython extension modules in rpython. (and manually doing ref counting (etc.) on the cpython objects.) Simon.