|
From: Thomas H. <tho...@io...> - 2001-08-30 17:14:44
|
Ken,
I would like to hear more of the direction PyInline
is heading at, I also have some ideas.
1. It wold be cool if the generated C-code would contain
#line directives pointing into the correct location
into the python source file, but I doubt that it is
possible to do it automatically.
2. Currently you automatically wrap C-functions
by parsing their header. This is (nearly) trivial
for simple argument and return types, but impossible
for structured types. How will this be handled?
3. Currently you import names in the module into
the current namespace. Wouldn't it be cool to write
func = PyInline.function(r"""
void ja(char *str) {
printf("Just another %s hacker\n", str);
}
""")
func("Inline")
or even
PyInline.function(r"""
void ja(char *str) {
printf("Just another %s hacker\n", str);
}
""")("PyInline")
or even
class X:
meth = PyInline.method(r"""
void ja(PyObject *self, char *str) {
printf("Just another %s hacker\n", str);
}""")
to define an instance method written in C?
Thomas
|