- made all internal struct types NativeStructs so that all variables of their types are made references.
This commit is contained in:
parent
360436c201
commit
6cc00e79a6
7 changed files with 27 additions and 6 deletions
|
|
@ -663,7 +663,7 @@ void InitThingdef()
|
|||
{
|
||||
PType *TypeActor = NewPointer(RUNTIME_CLASS(AActor));
|
||||
|
||||
PStruct *sstruct = NewStruct("Sector", nullptr);
|
||||
PStruct *sstruct = NewNativeStruct("Sector", nullptr);
|
||||
auto sptr = NewPointer(sstruct);
|
||||
sstruct->AddNativeField("soundtarget", TypeActor, myoffsetof(sector_t, SoundTarget));
|
||||
|
||||
|
|
|
|||
|
|
@ -1533,7 +1533,7 @@ PType *ZCCCompiler::ResolveUserType(ZCC_BasicType *type, PSymbolTable *symt)
|
|||
{
|
||||
return TypeSInt32; // hack this to an integer until we can resolve the enum mess.
|
||||
}
|
||||
if (ptype->IsKindOf(RUNTIME_CLASS(PClass)))
|
||||
if (ptype->IsKindOf(RUNTIME_CLASS(PNativeStruct))) // native structs and classes cannot be instantiated, they always get used as reference.
|
||||
{
|
||||
return NewPointer(ptype, type->isconst);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue