ui/common/types.c

changeset 622
9090faa4094b
parent 612
8570430391b3
child 629
0385a450c2a6
--- a/ui/common/types.c	Sat Jun 14 11:05:57 2025 +0200
+++ b/ui/common/types.c	Sat Jun 14 11:17:17 2025 +0200
@@ -249,7 +249,7 @@
 // types
 
 // public functions
-UiInteger* ui_int_new(UiContext *ctx, char *name) {
+UiInteger* ui_int_new(UiContext *ctx, const char *name) {
     UiInteger *i = ui_malloc(ctx, sizeof(UiInteger));
     memset(i, 0, sizeof(UiInteger));
     if(name) {
@@ -258,7 +258,7 @@
     return i;
 }
 
-UiDouble* ui_double_new(UiContext *ctx, char *name) {
+UiDouble* ui_double_new(UiContext *ctx, const char *name) {
     UiDouble *d = ui_malloc(ctx, sizeof(UiDouble));
     memset(d, 0, sizeof(UiDouble));
     if(name) {
@@ -267,7 +267,7 @@
     return d;
 }
 
-UiString* ui_string_new(UiContext *ctx, char *name) {
+UiString* ui_string_new(UiContext *ctx, const char *name) {
     UiString *s = ui_malloc(ctx, sizeof(UiString));
     memset(s, 0, sizeof(UiString));
     if(name) {
@@ -276,7 +276,7 @@
     return s;
 }
 
-UiText* ui_text_new(UiContext *ctx, char *name) {
+UiText* ui_text_new(UiContext *ctx, const char *name) {
     UiText *t = ui_malloc(ctx, sizeof(UiText));
     memset(t, 0, sizeof(UiText));
     if(name) {
@@ -285,7 +285,7 @@
     return t;
 }
 
-UiRange* ui_range_new(UiContext *ctx, char *name) {
+UiRange* ui_range_new(UiContext *ctx, const char *name) {
     UiRange *r = ui_malloc(ctx, sizeof(UiRange));
     memset(r, 0, sizeof(UiRange));
     if(name) {
@@ -294,7 +294,7 @@
     return r;
 }
 
-UIEXPORT UiGeneric* ui_generic_new(UiContext *ctx, char *name) {
+UIEXPORT UiGeneric* ui_generic_new(UiContext *ctx, const char *name) {
     UiGeneric *g = ui_malloc(ctx, sizeof(UiGeneric));
     memset(g, 0, sizeof(UiGeneric));
     if(name) {

mercurial