Use std::shared_ptr for MacroArgs

This commit is contained in:
Rangi42
2024-03-22 10:02:22 -04:00
committed by Sylvie
parent e255af9e10
commit b85c5cde8f
6 changed files with 25 additions and 23 deletions

View File

@@ -43,7 +43,7 @@ void sym_ForEach(void (*callback)(Symbol &)) {
}
static int32_t Callback_NARG() {
if (!macro_GetCurrentArgs()) {
if (!macro_HasCurrentArgs()) {
error("_NARG does not make sense outside of a macro\n");
return 0;
}
@@ -147,7 +147,7 @@ Symbol *sym_FindScopedValidSymbol(std::string const &symName) {
return nullptr;
}
// `_NARG` has no value outside a macro
if (sym == _NARGSymbol && !macro_GetCurrentArgs()) {
if (sym == _NARGSymbol && !macro_HasCurrentArgs()) {
return nullptr;
}
return sym;