23.01.2012 17:15, Gour пишет:
On Sun, 22 Jan 2012 22:03:08 +0400
Denis Shelomovskij<[email protected]>  wrote:

I'm finishing a fast (I just don't see a faster way) and garbage-free
CTFE-capable wrapper. But it requires IDL to be written for every C
function.

I'm curious if you have read the following paper:

http://www.cse.unsw.edu.au/~chak/papers/Cha99b.html

describing C2Hs tool used to provide bindings for C libraries for
Haskell?

No. Will have a look.

Anyway, looks like that isn't the problem I'm trying to solve. I don't accenting on parsing C code (it's done in Function.__ctor and is obvious). The problem is to generate fast wrapper when we already know full function signature. It's done in Function.toString and I just don't understand how does it work, I just carefully add a new functionality watching not to change existing testcase results (nearly impossible without VCS).

The wrapper (the one I want to write) shouldn't leave garbage or do unnecessary memory allocations/readings/writings. One shouldn't be able to rewrite it's output to create a faster version for bottleneck, e.g.

Reply via email to