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 = { \
|
||||
.base = mSCRIPT_TYPE_OPAQUE, \
|
||||
.details = { \
|
||||
.type = &mSTStruct_ ## STRUCT \
|
||||
}, \
|
||||
.size = sizeof(void*), \
|
||||
.name = "ptr struct::" #STRUCT, \
|
||||
.alloc = NULL, \
|
||||
|
@ -141,6 +144,9 @@ CXX_GUARD_START
|
|||
}; \
|
||||
const struct mScriptType mSTStructPtrConst_ ## STRUCT = { \
|
||||
.base = mSCRIPT_TYPE_OPAQUE, \
|
||||
.details = { \
|
||||
.type = &mSTStructConst_ ## STRUCT \
|
||||
}, \
|
||||
.isConst = true, \
|
||||
.size = sizeof(void*), \
|
||||
.name = "ptr const struct::" #STRUCT, \
|
||||
|
|
|
@ -236,6 +236,7 @@ struct mScriptType {
|
|||
struct mScriptTypeTuple tuple;
|
||||
struct mScriptTypeFunction function;
|
||||
struct mScriptTypeClass* cls;
|
||||
const struct mScriptType* type;
|
||||
void* opaque;
|
||||
} details;
|
||||
const struct mScriptType* constType;
|
||||
|
|
Loading…
Reference in New Issue