From 2c73795c310c8f739262b243684ddfc265a4cac2 Mon Sep 17 00:00:00 2001 From: gambas Date: Fri, 4 Jun 2021 14:28:05 +0200 Subject: [PATCH] Take ':' inside identifiers into account by replacing them by '$'. [GB.JIT] * BUG: Take ':' inside identifiers into account by replacing them by '$', which is allowed in C identifiers. --- main/lib/jit/jit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main/lib/jit/jit.c b/main/lib/jit/jit.c index 050c3c901..551ec6650 100644 --- a/main/lib/jit/jit.c +++ b/main/lib/jit/jit.c @@ -122,7 +122,18 @@ TYPE JIT_ctype_to_type(CLASS *class, CTYPE ctype) static void JIT_begin(void) { + char *p; + JIT_prefix = STR_lower(JIT_class->name); + + p = JIT_prefix; + while (*p) + { + if (*p == ':') + *p = '$'; + p++; + } + _buffer = NULL; _buffer_decl = NULL; JIT_print("\n//////// %s\n\n", JIT_class->name);