asdlGen Reference Manual : Support Code : Note about --mono_types=false for C
Previous: Lists and Options
Next: asdlGen Reference Manual

7.4. Note about --mono_types=false for C

For the --mono_types false option in C these function expect functions pointers that correspond to the following C typedefs

typedef void *(*generic_reader_ty)(instream_ty s);
typedef void (*generic_writer_ty)(void *x,outstream_ty s);

Function pointer with different argument types are distinct types in C that can not be safely cast between because they may differ in calling conventions. asdlGen solves this problem by automatically generating function stubs that internally cast the void* pointers for each option and list type. These reader and writer functions are prefixed generic_. There also should be list_ty and opt_ty typedefs.


asdlGen Reference Manual : Support Code : Note about --mono_types=false for C
Previous: Lists and Options
Next: asdlGen Reference Manual