mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix change in behaviour of QFUNC
When using QFUNC, the intend most often is to have the name of the variable referencing the function as a string. This behaviour works when compiling without debug enabled. However if debug is enabled, QFUNC compiles in with the debug wrapper, becoming a code string instead of a string representation of a variable reference. A good example where this change of behaviour can be a problem is config attributes that refer to a call back (used a lot within ACE). In normal build, you will use a getvar to get the relevant code, as it is expected to point to the function. When using debug, you will need to do a compile instead, as it's a string representing a code block.
This commit is contained in:
parent
99d08d988a
commit
4c2c647842
@ -9,6 +9,11 @@
|
||||
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
|
||||
#undef QFUNC
|
||||
#undef QEFUNC
|
||||
#define QFUNC(var1) QUOTE(DFUNC(var1))
|
||||
#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2))
|
||||
|
||||
#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]
|
||||
#define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)]
|
||||
#define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)]
|
||||
|
Loading…
Reference in New Issue
Block a user