Sun, 25 Jan 2026 13:18:04 +0100
fix compilation errors introduced by recent UCX update
| src/ascension/error.h | file | annotate | diff | comparison | revisions | |
| src/ascension/shader.h | file | annotate | diff | comparison | revisions | |
| src/behavior.c | file | annotate | diff | comparison | revisions | |
| src/scene.c | file | annotate | diff | comparison | revisions | |
| src/scene_node.c | file | annotate | diff | comparison | revisions | |
| src/text.c | file | annotate | diff | comparison | revisions |
--- a/src/ascension/error.h Thu Jan 08 18:20:33 2026 +0100 +++ b/src/ascension/error.h Sun Jan 25 13:18:04 2026 +0100 @@ -28,6 +28,8 @@ #ifndef ASC_ERROR_H #define ASC_ERROR_H +#include <stdbool.h> + void asc_error_(const char *file, unsigned line, const char *fmt, ...); #define asc_error(...) asc_error_(__FILE__, __LINE__, __VA_ARGS__)
--- a/src/ascension/shader.h Thu Jan 08 18:20:33 2026 +0100 +++ b/src/ascension/shader.h Sun Jan 25 13:18:04 2026 +0100 @@ -75,7 +75,7 @@ * * The IDs above this number are reserved for the engine. */ -#define ASC_SHADER_ID_USER_MAX 1'000'000'000u +#define ASC_SHADER_ID_USER_MAX 1000000000u /** * A function to create a shader program.
--- a/src/behavior.c Thu Jan 08 18:20:33 2026 +0100 +++ b/src/behavior.c Sun Jan 25 13:18:04 2026 +0100 @@ -70,7 +70,7 @@ behavior->disable_while_hidden = args.disable_while_hidden; behavior->name = args.name == NULL ? asc_util_gen_name("behavior") - : cx_mutstr(strdup(args.name)); + : cx_strdup(args.name); asc_dprintf("Create behavior: %"CX_PRIstr, CX_SFMT(behavior->name)); return behavior; }
--- a/src/scene.c Thu Jan 08 18:20:33 2026 +0100 +++ b/src/scene.c Sun Jan 25 13:18:04 2026 +0100 @@ -50,8 +50,7 @@ if (name == NULL) { scene->name = asc_util_gen_name("scene"); } else { - scene->name.ptr = strdup(name); - scene->name.length = strlen(name); + scene->name = cx_strdup(name); } asc_dprintf("Initialized scene %"CX_PRIstr, CX_SFMT(scene->name)); }
--- a/src/scene_node.c Thu Jan 08 18:20:33 2026 +0100 +++ b/src/scene_node.c Sun Jan 25 13:18:04 2026 +0100 @@ -144,12 +144,8 @@ void asc_scene_node_name(AscSceneNode *node, const char *name) { cx_strfree(&node->name); - if (name == NULL) { - node->name.ptr = NULL; - node->name.length = 0; - } else { - node->name.ptr = strdup(name); - node->name.length = strlen(name); + if (name != NULL) { + node->name = cx_strdup(name); } }
--- a/src/text.c Thu Jan 08 18:20:33 2026 +0100 +++ b/src/text.c Sun Jan 25 13:18:04 2026 +0100 @@ -156,9 +156,9 @@ text->color = args.color; } if (args.text == NULL) { - text->text = cx_mutstr(strdup(" ")); + text->text = cx_strdup(" "); } else { - text->text = cx_mutstr(strdup(args.text)); + text->text = cx_strdup(args.text); } if (args.centered) { asc_set_flag(node->flags, ASC_TEXT_CENTERED_FLAG);