[Pyrex] Function wrapping problems
Simon Frost
sdfrost at ucsd.edu
Tue Oct 14 23:19:35 CEST 2003
Dear Pyrex List,
I'm trying to wrap some C code (emitted from Eiffel using the SmartEiffel
compiler, not that it matters) using Pyrex, so I can call the C function
from Python. The C code that calls the function directly is as follows:
#include <stdio.h>
#include "eiffel.h"
int main(int argc, char* argv[ ])
{
initialize_eiffel_runtime(argc,argv);
run_epidemic(eiffel_root_object);
return 0;
}
Here are the declarations that I (think I) need for Pyrex:
cdef extern from "epidemic.h":
void initialize_eiffel_runtime(int argc,char* argv[])
cdef extern from "eiffel.h":
void run_epidemic(void* C)
void* eiffel_root_object
This question probably reflects my lack of knowledge (of both C and Pyrex),
but how can I reproduce my C main function within a Pyrex function?
Thanks!
Simon
More information about the Pyrex
mailing list