Skip to content

Commit 6cf7ef4

Browse files
Merge pull request #102 from vfx-rs/include_header_for_opaquebytes_field
Include header for opaquebytes fields as well as valuetype
2 parents 6693df2 + c4b1010 commit 6cf7ef4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

asttoc/src/cppmm_ast_add_c.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ void add_record_declaration(TranslationUnit& c_tu, const NodePtr& node_ptr,
423423
c_tu.header_includes.insert(r_tu->header_filename);
424424
}
425425
*/
426-
if (bind_type(record) == BindType::ValueType) {
426+
auto record_bind_type = bind_type(record);
427+
if (record_bind_type == BindType::ValueType ||
428+
record_bind_type == BindType::OpaqueBytes) {
427429
// insert header for value type
428430
c_tu.header_includes.insert(r_tu->header_filename);
429431
} else {

0 commit comments

Comments
 (0)