diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-26 19:12:55 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-26 19:12:55 -0400 |
commit | da739f32830ef19b3400cbdf1ba18f5342abe7f0 (patch) | |
tree | 556a2b518a15e9972691998907641e5e28573297 | |
parent | e140c56525cca0eb490bdd77eac4701f4748d34f (diff) |
pso/macros: Add `EXTERN_OBJECT_NAME` macro
-rw-r--r-- | context.h | 2 | ||||
-rw-r--r-- | include/pso/macros.h | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -31,6 +31,8 @@ typedef long ptrdiff_t; #define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num))) // pso/macros.h +#define EXTERN_OBJECT_NAME(name) extern const char *name##_name; + #define OBJECT_NAME(name) const char *name##_name = #name; #define OBJECT_NAMES \ o(TObject) \ diff --git a/include/pso/macros.h b/include/pso/macros.h index a341b7f..e93e2de 100644 --- a/include/pso/macros.h +++ b/include/pso/macros.h @@ -1,6 +1,8 @@ #ifndef MACROS_H #define MACROS_H +#define EXTERN_OBJECT_NAME(name) extern const char *name##_name; + #define OBJECT_NAME(name) const char *name##_name = #name; #define OBJECT_NAMES \ o(TObject) \ |