add win32 (msvc) support

This commit is contained in:
2024-11-14 16:56:12 +00:00
parent c14c2e5500
commit d614e110df
35 changed files with 454 additions and 280 deletions

View File

@@ -48,7 +48,7 @@ static char *string_ptr(struct b_string *str)
return str->s_data.d_inline;
}
return str->s_data.d_external;
return str->s_data.d_BLUE_APIal;
}
static int string_make_inline(struct b_string *str)
@@ -76,7 +76,7 @@ static int string_resize_large(struct b_string *str, size_t capacity)
}
str->s_max = capacity;
str->s_data.d_external = new_buffer;
str->s_data.d_BLUE_APIal = new_buffer;
return 0;
}
@@ -92,7 +92,7 @@ static int string_make_large(struct b_string *str, size_t capacity)
buffer[str->s_len] = '\0';
str->s_max = capacity;
str->s_data.d_external = buffer;
str->s_data.d_BLUE_APIal = buffer;
return 0;
}
@@ -178,7 +178,7 @@ char *b_string_steal(struct b_string *str)
dest = b_strdup(src);
} else {
dest = src;
str->s_data.d_external = NULL;
str->s_data.d_BLUE_APIal = NULL;
str->s_max = 0;
}
@@ -318,7 +318,7 @@ const char *b_string_ptr(const struct b_string *str)
return str->s_data.d_inline;
}
return str->s_data.d_external;
return str->s_data.d_BLUE_APIal;
}
static void string_release(struct b_object *obj)