I'm trying to write a JIT-able IO lib, but the way I'm handling file:close() causes blacklisting and NYIs.
This is my "main" cdef: ------------------------------------------------------------------------------------------------------------- typedef struct FILE FILE; typedef struct SExIO_CloseResult { bool status; char *msg; int en; } SExIO_CloseResult; struct SExIO_Stream; typedef struct SExIO_Stream { FILE *f; /* stream (NULL for incompletely created streams) */SExIO_CloseResult *(*closef)(struct SExIO_Stream *stream); /* to close stream (NULL for closed streams) */
} SExIO_Stream; -------------------------------------------------------------------------------------------------------------Obviously using callbacks for this is a bad idea, as it causes blacklisting and NYIs. What would be the proper way for me to do this?