Scripting: Allow "opaque" pointers a bit more clarity

This commit is contained in:
Vicki Pfau 2022-05-23 21:59:42 -07:00
parent 6b2fa8fe67
commit 7ab5f3d690
2 changed files with 7 additions and 0 deletions

View File

@ -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, \

View File

@ -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;