refactor(module): centralize path parsing and add OS-specific separator

- Define STK_PATH_SEP macro to handle Windows and Unix path separators.
- Refactor extract_module_id to use STK_PATH_SEP.
- Simplify stk_module_load by delegating module ID extraction to extract_module_id.
This commit is contained in:
2026-01-29 22:16:48 +01:00
parent 92e33ff265
commit baa75e897f
2 changed files with 12 additions and 28 deletions
+1 -1
View File
@@ -142,7 +142,6 @@ size_t stk_poll(void)
for (i = 0; i < file_count; ++i) {
extract_module_id(file_list[i], mod_id);
switch (events[i]) {
case STK_MOD_LOAD:
loaded_mod_indices[load_index++] = i;
break;
@@ -240,6 +239,7 @@ trim_arrays:
++write_pos;
}
}
module_count = write_pos;
stk_module_realloc_memory(module_count);