aboutsummaryrefslogtreecommitdiff
path: root/src/internal/types.h
blob: 157f90e2ac74f15efd5178c5273fd66c97e60adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef TYPES_H
#define TYPES_H

#include "ns_plugin.h"

typedef struct {
    PluginInitFuncs* funcs;
    PluginNorthstarData* data;
    PluginEngineData* 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