Support import files as modules (i.e. import only once)

This commit is contained in:
gingerBill
2016-07-21 00:26:14 +01:00
parent aa6a2caecb
commit cbd82e3c02
17 changed files with 1462 additions and 1481 deletions
+6 -1
View File
@@ -1631,7 +1631,8 @@ GB_STATIC_ASSERT(GB_ARRAY_GROW_FORMULA(0) > 0);
void **gb__array_ = cast(void **)&(x); \
gbArrayHeader *gb__ah = cast(gbArrayHeader *)gb_alloc(allocator_, gb_size_of(gbArrayHeader)+gb_size_of(*(x))*(cap)); \
gb__ah->allocator = allocator_; \
gb__ah->count = gb__ah->capacity = 0; \
gb__ah->count = 0; \
gb__ah->capacity = cap; \
*gb__array_ = cast(void *)(gb__ah+1); \
} while (0)
@@ -8122,6 +8123,10 @@ gb_no_inline isize gb_snprintf_va(char *text, isize max_len, char const *fmt, va
info.flags |= (gbFmt_Lower|gbFmt_Unsigned|gbFmt_Alt|gbFmt_Intptr);
break;
case '%':
len = gb__print_char(text, remaining, &info, '%');
break;
default: fmt--; break;
}