6 Oct
2005
6 Oct
'05
10:14 p.m.
Due to my pretty rusty C skills I have what I hope is a naive question. I'm writing a cffi interface to the tidy lib which among other things has the following construct: // in include file: struct _TidyBuffer; typedef struct _TidyBuffer TidyBuffer; typedef void* TidyDoc; // example caller: TidyBuffer output = {0}; TidyDoc tdoc = tidyCreate(); ... tidySaveBuffer(tdoc, &output) ... so, tidy allocates some memory from a pointer reference supplied by the client. How do I declare and pass this reference to the foreign function?