Tweaked output callbacks to match 'puts' signature

This commit is contained in:
2026-05-08 11:12:27 +10:00
parent 185f3896c5
commit be84a8dfe2
5 changed files with 24 additions and 37 deletions
+2 -1
View File
@@ -5,9 +5,10 @@
int counter = 0;
void counterCallback(const char* msg) {
int counterCallback(const char* msg) {
(void)msg;
counter++;
return 0;
}
int test_callbacks(void) {
+2 -1
View File
@@ -161,12 +161,13 @@ int test_opcode_not_equal(Toy_Bucket** bucketHandle) {
}
static char* callbackUtilReceived = NULL;
static void callbackUtil(const char* msg) {
static int callbackUtil(const char* msg) {
if (msg != NULL) {
free(callbackUtilReceived);
callbackUtilReceived = (char*)malloc(strlen(msg) + 1);
strcpy(callbackUtilReceived, msg);
}
return 0;
}
int test_keyword_assert(Toy_Bucket** bucketHandle) {