17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#define _warn(msg) _emit(warn, msg)
#define _err(msg) _emit(err, msg)
typedef GDExtensionBool gdBool;
#define _alloc(ty, n) \
((typeof(ty)*)gdjn_alloc(sizeof(ty) * (n)))
#define _free(v) \
(gdjn_ctx -> gd.free(v))
#define _sz(r) ((sizeof(r) / sizeof(*r)))
#define _t(T) \
(gdjn_ctx -> gd.t.gd_##T)
#define _method(name) \
................................................................................
GDExtensionObjectPtr
janetLang_inst,
janetLoader_inst,
janetSaver_inst;
} gd;
struct gdjn_jn {
Janet env;
} jn;
} gdjn;
extern gdjn* gdjn_ctx;
[[gnu::alloc_size(1)]] static inline
void* gdjn_alloc(size_t sz) {
return gdjn_ctx -> gd.alloc(sz);
}
typedef struct gdjn_gd gdjn_gd; // derp
typedef struct gdjn_jn gdjn_jn;
typedef struct gdjn_class_def gdjn_class_def;
void
gdjn_dox
( gd_dictionary* page
);
|
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#define _warn(msg) _emit(warn, msg)
#define _err(msg) _emit(err, msg)
typedef GDExtensionBool gdBool;
#define _alloc(ty, n) \
((typeof(ty)*)gdjn_alloc(sizeof(ty) * (n)))
#define _realloc(v, ty, n) \
((typeof(ty)*)gdjn_realloc((v), sizeof(ty) * (n)))
#define _free(v) \
(gdjn_ctx -> gd.free(v))
#define _sz(r) ((sizeof(r) / sizeof(*r)))
#define _t(T) \
(gdjn_ctx -> gd.t.gd_##T)
#define _method(name) \
................................................................................
GDExtensionObjectPtr
janetLang_inst,
janetLoader_inst,
janetSaver_inst;
} gd;
struct gdjn_jn {
JanetTable* api;
} jn;
} gdjn;
extern gdjn* gdjn_ctx;
[[gnu::alloc_size(1)]] static inline
void* gdjn_alloc(size_t sz) {
return gdjn_ctx -> gd.alloc(sz);
}
[[gnu::alloc_size(2)]] static inline
void* gdjn_realloc(void* v, size_t sz) {
return gdjn_ctx -> gd.realloc(v, sz);
}
typedef struct gdjn_gd gdjn_gd; // derp
typedef struct gdjn_jn gdjn_jn;
typedef struct gdjn_class_def gdjn_class_def;
void
gdjn_dox
( gd_dictionary* page
);
|