project
The parser is connected as a module ("from inlinec import inlinec"), which performs primary processing and on the fly translates the definitions of C-functions, allocated using the @inlinec annotations, into ctypes-bindings and replaces the body of the C-function with a call to these bindings. After such a transformation, the Python interpreter receives the already correct converted source text of the script, the C functions in which are called using
# coding: inlinec
from inlinec import inlinec
@inlinec
deftest():
#include
void test() {
printf("Hello world");
}
The development is still being presented as an experimental prototype, which notes such shortcomings as the lack of support for passing pointers to the function (except for strings), the need to run
"gcc -E" for code preprocessing, saving intermediate *.so, *.o and *.c files in the current directory, no caching of the converted version and extra parsing steps (large delays at each start).
Source: opennet.ru