Fix minor errors for *nix

This commit is contained in:
Ginger Bill
2017-08-01 17:28:49 +01:00
parent 66d8776b83
commit d854c5003c
3 changed files with 3 additions and 3 deletions

View File

@@ -237,7 +237,7 @@ String path_to_fullpath(gbAllocator a, String s) {
String path_to_fullpath(gbAllocator a, String s) {
char *p;
gb_mutex_lock(&string_buffer_mutex);
p = realpath(cast(char *)s.data, 0);
p = realpath(cast(char *)s.text, 0);
gb_mutex_unlock(&string_buffer_mutex);
if(p == nullptr) return make_string_c("");
return make_string_c(p);

View File

@@ -3613,7 +3613,7 @@ String ir_mangle_name(irGen *s, String path, Entity *e) {
cast(char *)new_name, max_len,
"%.*s-%u.%.*s",
cast(int)base_len, base,
file->id,
cast(u32)file->id,
LIT(name));
}
if (require_suffix_id) {

View File

@@ -2556,7 +2556,7 @@ String ssa_mangle_name(ssaModule *m, String path, Entity *e) {
cast(char *)new_name, max_len,
"%.*s-%u.%.*s",
cast(int)base_len, base,
file->id,
cast(u32)file->id,
LIT(name));
if (is_overloaded) {
char *str = cast(char *)new_name + new_name_len-1;