Refactor structs to use methods instead of functions (#1322)

This commit is contained in:
Sylvie
2024-03-01 13:11:45 -05:00
committed by GitHub
parent e14ba664ea
commit 1ac3c0262f
18 changed files with 364 additions and 446 deletions

View File

@@ -5,18 +5,22 @@
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include "asm/warning.hpp"
#include "helpers.hpp"
struct MacroArgs;
struct MacroArgs {
unsigned int shift;
std::vector<char *> args;
void append(char *s);
void clear();
};
MacroArgs *macro_GetCurrentArgs();
MacroArgs *macro_NewArgs();
void macro_AppendArg(MacroArgs *args, char *s);
void macro_UseNewArgs(MacroArgs *args);
void macro_FreeArgs(MacroArgs *args);
char const *macro_GetArg(uint32_t i);
char const *macro_GetAllArgs();