| ... | ... | @@ -8484,19 +8484,19 @@ static void get_c_type(CodeGen *g, GenH *gen_h, ZigType *type_entry, Buf *out_bu |
| 8484 | 8484 | case ZigTypeIdOpaque: |
| 8485 | 8485 | { |
| 8486 | 8486 | buf_init_from_str(out_buf, "struct "); |
| 8487 | | buf_append_buf(out_buf, &type_entry->name); |
| 8487 | buf_append_buf(out_buf, type_h_name(type_entry)); |
| 8488 | 8488 | return; |
| 8489 | 8489 | } |
| 8490 | 8490 | case ZigTypeIdUnion: |
| 8491 | 8491 | { |
| 8492 | 8492 | buf_init_from_str(out_buf, "union "); |
| 8493 | | buf_append_buf(out_buf, &type_entry->name); |
| 8493 | buf_append_buf(out_buf, type_h_name(type_entry)); |
| 8494 | 8494 | return; |
| 8495 | 8495 | } |
| 8496 | 8496 | case ZigTypeIdEnum: |
| 8497 | 8497 | { |
| 8498 | 8498 | buf_init_from_str(out_buf, "enum "); |
| 8499 | | buf_append_buf(out_buf, &type_entry->name); |
| 8499 | buf_append_buf(out_buf, type_h_name(type_entry)); |
| 8500 | 8500 | return; |
| 8501 | 8501 | } |
| 8502 | 8502 | case ZigTypeIdArray: |
| ... | ... | @@ -8679,7 +8679,7 @@ static void gen_h_file(CodeGen *g) { |
| 8679 | 8679 | zig_unreachable(); |
| 8680 | 8680 | case ZigTypeIdEnum: |
| 8681 | 8681 | if (type_entry->data.enumeration.layout == ContainerLayoutExtern) { |
| 8682 | | fprintf(out_h, "enum %s {\n", buf_ptr(&type_entry->name)); |
| 8682 | fprintf(out_h, "enum %s {\n", buf_ptr(type_h_name(type_entry))); |
| 8683 | 8683 | for (uint32_t field_i = 0; field_i < type_entry->data.enumeration.src_field_count; field_i += 1) { |
| 8684 | 8684 | TypeEnumField *enum_field = &type_entry->data.enumeration.fields[field_i]; |
| 8685 | 8685 | Buf *value_buf = buf_alloc(); |
| ... | ... | @@ -8692,12 +8692,12 @@ static void gen_h_file(CodeGen *g) { |
| 8692 | 8692 | } |
| 8693 | 8693 | fprintf(out_h, "};\n\n"); |
| 8694 | 8694 | } else { |
| 8695 | | fprintf(out_h, "enum %s;\n", buf_ptr(&type_entry->name)); |
| 8695 | fprintf(out_h, "enum %s;\n", buf_ptr(type_h_name(type_entry))); |
| 8696 | 8696 | } |
| 8697 | 8697 | break; |
| 8698 | 8698 | case ZigTypeIdStruct: |
| 8699 | 8699 | if (type_entry->data.structure.layout == ContainerLayoutExtern) { |
| 8700 | | fprintf(out_h, "struct %s {\n", buf_ptr(&type_entry->name)); |
| 8700 | fprintf(out_h, "struct %s {\n", buf_ptr(type_h_name(type_entry))); |
| 8701 | 8701 | for (uint32_t field_i = 0; field_i < type_entry->data.structure.src_field_count; field_i += 1) { |
| 8702 | 8702 | TypeStructField *struct_field = &type_entry->data.structure.fields[field_i]; |
| 8703 | 8703 | |
| ... | ... | @@ -8715,12 +8715,12 @@ static void gen_h_file(CodeGen *g) { |
| 8715 | 8715 | } |
| 8716 | 8716 | fprintf(out_h, "};\n\n"); |
| 8717 | 8717 | } else { |
| 8718 | | fprintf(out_h, "struct %s;\n", buf_ptr(&type_entry->name)); |
| 8718 | fprintf(out_h, "struct %s;\n", buf_ptr(type_h_name(type_entry))); |
| 8719 | 8719 | } |
| 8720 | 8720 | break; |
| 8721 | 8721 | case ZigTypeIdUnion: |
| 8722 | 8722 | if (type_entry->data.unionation.layout == ContainerLayoutExtern) { |
| 8723 | | fprintf(out_h, "union %s {\n", buf_ptr(&type_entry->name)); |
| 8723 | fprintf(out_h, "union %s {\n", buf_ptr(type_h_name(type_entry))); |
| 8724 | 8724 | for (uint32_t field_i = 0; field_i < type_entry->data.unionation.src_field_count; field_i += 1) { |
| 8725 | 8725 | TypeUnionField *union_field = &type_entry->data.unionation.fields[field_i]; |
| 8726 | 8726 | |
| ... | ... | @@ -8730,11 +8730,11 @@ static void gen_h_file(CodeGen *g) { |
| 8730 | 8730 | } |
| 8731 | 8731 | fprintf(out_h, "};\n\n"); |
| 8732 | 8732 | } else { |
| 8733 | | fprintf(out_h, "union %s;\n", buf_ptr(&type_entry->name)); |
| 8733 | fprintf(out_h, "union %s;\n", buf_ptr(type_h_name(type_entry))); |
| 8734 | 8734 | } |
| 8735 | 8735 | break; |
| 8736 | 8736 | case ZigTypeIdOpaque: |
| 8737 | | fprintf(out_h, "struct %s;\n\n", buf_ptr(&type_entry->name)); |
| 8737 | fprintf(out_h, "struct %s;\n\n", buf_ptr(type_h_name(type_entry))); |
| 8738 | 8738 | break; |
| 8739 | 8739 | } |
| 8740 | 8740 | } |