diff --git a/include/mgba/script/macros.h b/include/mgba/script/macros.h index 1aa6fb87c..293c63f46 100644 --- a/include/mgba/script/macros.h +++ b/include/mgba/script/macros.h @@ -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, \ diff --git a/include/mgba/script/types.h b/include/mgba/script/types.h index 7a6bc6513..e0a369c46 100644 --- a/include/mgba/script/types.h +++ b/include/mgba/script/types.h @@ -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;