From b92f3d1d6ad49881eb31ac911a8ad368743af108 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 24 Sep 2023 12:43:27 +0200 Subject: implement RPC --- src/internal/types.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/internal/types.h (limited to 'src/internal/types.h') diff --git a/src/internal/types.h b/src/internal/types.h new file mode 100644 index 0000000..a19c00c --- /dev/null +++ b/src/internal/types.h @@ -0,0 +1,38 @@ +#ifndef TYPES_H +#define TYPES_H + +#include "ns_plugin.h" + +typedef struct { + PluginInitFuncs* funcs; + PluginNorthstarData* data; + EngineData* engine_data; +} PLUGIN_DATA_TYPES ; + +#ifndef SQTrue +#define SQTrue (1) +#endif + +#ifndef SQFalse +#define SQFalse (0) +#endif + +#ifndef SQ_FAILED +#define SQ_FAILED(res) (res<0) +#endif + +#ifndef SQ_SUCCEEDED +#define SQ_SUCCEEDED(res) (res>=0) +#endif + +#ifndef ISREFCOUNTED +#define ISREFCOUNTED(t) (t&SQOBJECT_REF_COUNTED) +#endif + +#ifndef sq_isnull +#define sq_isnull(o) ((o)._type==OT_NULL) +#endif + +#define SQ_NULL_OBJ SQObject { OT_NULL, 0, nullptr } + +#endif -- cgit v1.2.3