@@ -661,6 +661,7 @@ void updateTypeDatabase(Platform platform) throws Exception {
661661 var stringDataUnion = new UnionDataType (cat , cat .getName ());
662662 stringDataUnion .add (new PointerDataType (CharDataType .dataType ), pointerSize , "ptr" , "" );
663663 stringDataUnion .add (new ArrayDataType (CharDataType .dataType , 0x10 , 0x1 ), 0x10 , "data" , "SSO" );
664+ stringDataUnion .setPackingEnabled (true );
664665
665666 cat = this .createCategoryAll (category .extend ("gd" , "string" ));
666667 var string = new StructureDataType (cat , cat .getName (), 0x0 );
@@ -696,11 +697,13 @@ else if (platform == Platform.MAC_ARM || platform == Platform.MAC_INTEL || platf
696697 if (platform != Platform .MAC_INTEL ) {
697698 stringShort .add (ByteDataType .dataType , 0x1 , "size" , "The size of the string data" );
698699 }
700+ stringShort .setPackingEnabled (true );
699701
700702 cat = this .createCategoryAll (category .extend ("gd" , "string_data_union" ));
701703 var stringDataUnion = new UnionDataType (cat , cat .getName ());
702704 stringDataUnion .add (stringLong , pointerSize * 3 , "long" , "Long string data" );
703705 stringDataUnion .add (stringShort , pointerSize * 3 , "short" , "Short string data" );
706+ stringDataUnion .setPackingEnabled (true );
704707
705708 cat = this .createCategoryAll (category .extend ("gd" , "string" ));
706709 var string = new StructureDataType (cat , cat .getName (), 0x0 );
@@ -721,6 +724,7 @@ else if (platform == Platform.ANDROID32 || platform == Platform.ANDROID64) { //
721724 var stringDataUnion = new UnionDataType (cat , cat .getName ());
722725 stringDataUnion .add (new PointerDataType (stringData ), pointerSize , "data" , "Pointer to the string information" );
723726 stringDataUnion .add (new PointerDataType (CharDataType .dataType ), pointerSize , "ptr" , "Pointer to the string data" );
727+ stringDataUnion .setPackingEnabled (true );
724728
725729 cat = this .createCategoryAll (category .extend ("gd" , "string" ));
726730 var string = new StructureDataType (cat , cat .getName (), 0x0 );
@@ -1070,6 +1074,14 @@ else if (platform == Platform.ANDROID32 || platform == Platform.ANDROID64) { //
10701074 ccDictElement .setPackingEnabled (true );
10711075 manager .addDataType (ccDictElement , DataTypeConflictHandler .REPLACE_HANDLER );
10721076
1077+ // cocos2d::cc_timeval
1078+ cat = this .createCategoryAll (category .extend ("cocos2d" , "cc_timeval" ));
1079+ var ccTimeval = new StructureDataType (cat , cat .getName (), 0x0 );
1080+ ccTimeval .add (LongDataType .dataType , LongDataType .dataType .getLength (), "tv_sec" , "Seconds" );
1081+ ccTimeval .add (IntegerDataType .dataType , 4 , "tv_usec" , "Microseconds" );
1082+ ccTimeval .setPackingEnabled (true );
1083+ manager .addDataType (ccTimeval , DataTypeConflictHandler .REPLACE_HANDLER );
1084+
10731085 // geode::SeedValueSRV etc.
10741086
10751087 for (var x : new String [] { "SR" , "RS" , "VRS" , "VSR" , "RVS" , "RSV" , "SVR" , "SRV" }) {
0 commit comments