bottlenoselabs / c2cs

Generate C# bindings from a C header.
MIT License
250 stars 18 forks source link

Add option for single header #99

Closed lithiumtoast closed 2 years ago

lithiumtoast commented 2 years ago

Changes back default behaviour to parse the translation unit as a single "blob". This was found after generating bindings for sokol didn't work correctly out of the box due to adding the changes in #94. The ability to parse translation units individually is still useful in some scenarios to which the option is_enabled_single_header has been added to the configuration.

Note that blocking a header using header_files_blocked will only work in all cases when is_enabled_single_header is false. With this PR, the default value of is_enabled_single_header is true to which header_files_blocked only works correctly for the header file where the declaration actually occurs.