mirror of https://github.com/mgba-emu/mgba.git
Scripting: Allow "opaque" pointers a bit more clarity
This commit is contained in:
parent
6b2fa8fe67
commit
7ab5f3d690
|
@ -132,6 +132,9 @@ CXX_GUARD_START
|
||||||
}; \
|
}; \
|
||||||
const struct mScriptType mSTStructPtr_ ## STRUCT = { \
|
const struct mScriptType mSTStructPtr_ ## STRUCT = { \
|
||||||
.base = mSCRIPT_TYPE_OPAQUE, \
|
.base = mSCRIPT_TYPE_OPAQUE, \
|
||||||
|
.details = { \
|
||||||
|
.type = &mSTStruct_ ## STRUCT \
|
||||||
|
}, \
|
||||||
.size = sizeof(void*), \
|
.size = sizeof(void*), \
|
||||||
.name = "ptr struct::" #STRUCT, \
|
.name = "ptr struct::" #STRUCT, \
|
||||||
.alloc = NULL, \
|
.alloc = NULL, \
|
||||||
|
@ -141,6 +144,9 @@ CXX_GUARD_START
|
||||||
}; \
|
}; \
|
||||||
const struct mScriptType mSTStructPtrConst_ ## STRUCT = { \
|
const struct mScriptType mSTStructPtrConst_ ## STRUCT = { \
|
||||||
.base = mSCRIPT_TYPE_OPAQUE, \
|
.base = mSCRIPT_TYPE_OPAQUE, \
|
||||||
|
.details = { \
|
||||||
|
.type = &mSTStructConst_ ## STRUCT \
|
||||||
|
}, \
|
||||||
.isConst = true, \
|
.isConst = true, \
|
||||||
.size = sizeof(void*), \
|
.size = sizeof(void*), \
|
||||||
.name = "ptr const struct::" #STRUCT, \
|
.name = "ptr const struct::" #STRUCT, \
|
||||||
|
|
|
@ -236,6 +236,7 @@ struct mScriptType {
|
||||||
struct mScriptTypeTuple tuple;
|
struct mScriptTypeTuple tuple;
|
||||||
struct mScriptTypeFunction function;
|
struct mScriptTypeFunction function;
|
||||||
struct mScriptTypeClass* cls;
|
struct mScriptTypeClass* cls;
|
||||||
|
const struct mScriptType* type;
|
||||||
void* opaque;
|
void* opaque;
|
||||||
} details;
|
} details;
|
||||||
const struct mScriptType* constType;
|
const struct mScriptType* constType;
|
||||||
|
|
Loading…
Reference in New Issue