From 2ed72022ce56b06bb3e90ca9259065452e209eb9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 7 May 2016 17:00:58 -0700 Subject: support generic data structures See #22 --- src/parseh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/parseh.cpp') diff --git a/src/parseh.cpp b/src/parseh.cpp index fc141743a8..ef457b51a8 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -801,6 +801,7 @@ static TypeTableEntry *resolve_enum_decl(Context *c, const EnumDecl *enum_decl) const EnumDecl *enum_def = enum_decl->getDefinition(); if (!enum_def) { TypeTableEntry *enum_type = get_partial_container_type(c->codegen, c->import, + c->import->block_context, ContainerKindEnum, c->source_node, buf_ptr(full_type_name)); c->enum_type_table.put(bare_name, enum_type); c->decl_table.put(enum_decl, enum_type); @@ -825,6 +826,7 @@ static TypeTableEntry *resolve_enum_decl(Context *c, const EnumDecl *enum_decl) if (pure_enum) { TypeTableEntry *enum_type = get_partial_container_type(c->codegen, c->import, + c->import->block_context, ContainerKindEnum, c->source_node, buf_ptr(full_type_name)); c->enum_type_table.put(bare_name, enum_type); c->decl_table.put(enum_decl, enum_type); @@ -985,7 +987,7 @@ static TypeTableEntry *resolve_record_decl(Context *c, const RecordDecl *record_ TypeTableEntry *struct_type = get_partial_container_type(c->codegen, c->import, - ContainerKindStruct, c->source_node, buf_ptr(full_type_name)); + c->import->block_context, ContainerKindStruct, c->source_node, buf_ptr(full_type_name)); c->struct_type_table.put(bare_name, struct_type); c->decl_table.put(record_decl, struct_type); -- cgit v1.2.3