RNA: support compiling rna files as C++ code #108290

Merged
Jacques Lucke merged 29 commits from JacquesLucke/blender:rna-cpp into main 2023-06-09 11:45:46 +02:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit a624f308a3 - Show all commits

View File

@ -5424,7 +5424,9 @@ static int rna_preprocess(const char *outfile, const char *public_header_outfile
fprintf(file,
"/* Automatically generated function declarations for the Data API.\n"
" * Do not edit manually, changes will be overwritten. */\n\n");
fprintf(file, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n");
rna_generate_struct_rna_prototypes(brna, file);
fprintf(file, "#ifdef __cplusplus\n}\n#endif\n");
fclose(file);
status = (DefRNA.error != 0);
}