shithub: rgbds

Download patch

ref: bbae9966e904a82c3075f7078ee8dc1d6f51211f
parent: b3304ae1ac7fef3d1551315f3cb1d60db19bbf77
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Feb 5 08:34:47 EST 2022

Fix string constness issues in RGBASM

--- a/include/asm/macro.h
+++ b/include/asm/macro.h
@@ -25,7 +25,7 @@
 void macro_UseNewArgs(struct MacroArgs *args);
 void macro_FreeArgs(struct MacroArgs *args);
 char const *macro_GetArg(uint32_t i);
-char *macro_GetAllArgs(void);
+char const *macro_GetAllArgs(void);
 
 uint32_t macro_GetUniqueID(void);
 char const *macro_GetUniqueIDStr(void);
--- a/include/asm/opt.h
+++ b/include/asm/opt.h
@@ -12,8 +12,8 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-void opt_B(char chars[2]);
-void opt_G(char chars[4]);
+void opt_B(char const chars[2]);
+void opt_G(char const chars[4]);
 void opt_P(uint8_t fill);
 void opt_L(bool optimize);
 void opt_W(char const *flag);
--- a/src/asm/macro.c
+++ b/src/asm/macro.c
@@ -101,7 +101,7 @@
 					      : macroArgs->args[realIndex];
 }
 
-char *macro_GetAllArgs(void)
+char const *macro_GetAllArgs(void)
 {
 	if (!macroArgs)
 		return NULL;
--- a/src/asm/opt.c
+++ b/src/asm/opt.c
@@ -24,12 +24,12 @@
 
 static struct OptStackEntry *stack = NULL;
 
-void opt_B(char chars[2])
+void opt_B(char const chars[2])
 {
 	lexer_SetBinDigits(chars);
 }
 
-void opt_G(char chars[4])
+void opt_G(char const chars[4])
 {
 	lexer_SetGfxDigits(chars);
 }