mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -86,7 +86,6 @@ make_soa_aligned :: proc($T: typeid/#soa[]$E, length: int, alignment: int, alloc
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
array.allocator = allocator
|
|
||||||
footer := raw_soa_footer(&array)
|
footer := raw_soa_footer(&array)
|
||||||
if size_of(E) == 0 {
|
if size_of(E) == 0 {
|
||||||
footer.len = length
|
footer.len = length
|
||||||
|
|||||||
@@ -907,7 +907,7 @@ gb_internal String internal_odin_root_dir(void) {
|
|||||||
text = gb_alloc_array(permanent_allocator(), u8, len + 1);
|
text = gb_alloc_array(permanent_allocator(), u8, len + 1);
|
||||||
gb_memmove(text, &path_buf[0], len);
|
gb_memmove(text, &path_buf[0], len);
|
||||||
|
|
||||||
path = path_to_fullpath(heap_allocator(), make_string(text, len));
|
path = path_to_fullpath(heap_allocator(), make_string(text, len), nullptr);
|
||||||
|
|
||||||
for (i = path.len-1; i >= 0; i--) {
|
for (i = path.len-1; i >= 0; i--) {
|
||||||
u8 c = path[i];
|
u8 c = path[i];
|
||||||
@@ -1072,7 +1072,7 @@ gb_internal String internal_odin_root_dir(void) {
|
|||||||
|
|
||||||
gb_memmove(text, &path_buf[0], len);
|
gb_memmove(text, &path_buf[0], len);
|
||||||
|
|
||||||
path = path_to_fullpath(heap_allocator(), make_string(text, len));
|
path = path_to_fullpath(heap_allocator(), make_string(text, len), nullptr);
|
||||||
for (i = path.len-1; i >= 0; i--) {
|
for (i = path.len-1; i >= 0; i--) {
|
||||||
u8 c = path[i];
|
u8 c = path[i];
|
||||||
if (c == '/' || c == '\\') {
|
if (c == '/' || c == '\\') {
|
||||||
@@ -1126,7 +1126,7 @@ gb_internal String path_to_fullpath(gbAllocator a, String s, bool *ok_) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#elif defined(GB_SYSTEM_OSX) || defined(GB_SYSTEM_UNIX)
|
#elif defined(GB_SYSTEM_OSX) || defined(GB_SYSTEM_UNIX)
|
||||||
gb_internal String path_to_fullpath(gbAllocator a, String s) {
|
gb_internal String path_to_fullpath(gbAllocator a, String s, bool *ok_) {
|
||||||
char *p;
|
char *p;
|
||||||
mutex_lock(&fullpath_mutex);
|
mutex_lock(&fullpath_mutex);
|
||||||
p = realpath(cast(char *)s.text, 0);
|
p = realpath(cast(char *)s.text, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user