Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions src/hx/cppia/CppiaVars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,9 @@ void CppiaVar::linkVarTypes(CppiaModule &cppia, int &ioOffset)
exprType = typeId==0 ? etObject : type->expressionType;
AlignOffset(exprType, ioOffset);
offset = ioOffset;

switch(exprType)
{
case etInt: ioOffset += sizeof(int); storeType=fsInt; break;
case etFloat: ioOffset += sizeof(Float);storeType=fsFloat; break;
case etString: ioOffset += sizeof(String);storeType=fsString; break;
case etObject: ioOffset += sizeof(hx::Object *);storeType=fsObject; break;
case etVoid:
case etNull:
break;
}

storeType = typeId==0 ? fsObject : fieldStorageFromType(type);
ioOffset += sTypeSize[exprType];
}
}

Expand Down
5 changes: 5 additions & 0 deletions test/cppia/cases/client/TestClient.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class TestClient extends Test {
public static var clientBool2 = true;
public static var clientBool3 = false;

var memberBool = true;

function testThread() {
// See if it compiles
Assert.notNull(sys.thread.Thread.current());
Expand Down Expand Up @@ -55,6 +57,9 @@ class TestClient extends Test {
var hostBools = HostBase.hostBool0 + "/" + HostBase.hostBool1 + "/" + HostBase.hostBool2 + "/" + HostBase.hostBool3;
var clientBools = clientBool0 + "/" + clientBool1 + "/" + clientBool2 + "/" + clientBool3;
Assert.equals(hostBools, clientBools);

Assert.same(Type.ValueType.TBool, Type.typeof(clientBool0));
Assert.same(Type.ValueType.TBool, Type.typeof(memberBool));
}

function testIssue926() {
Expand Down
Loading