Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.6.0 Alpha
-
None
-
00f35b4ae7f94e0fe1c8c77efec401ab5f3c4855
Description
There is a QT_POINTER_SIZE, which is set to the size of pointers on the target system. However, for host tools, the pointer size might be different. So it would be useful to have a QT_HOST_POINTER_SIZE for this.
The problematic case is QV4::Value, which stores (tagged) object pointers differently depending on 32/64 bit. The actual 'choice' is made by a macro, because the class has to be a PDO. Using a template to implement this, might remove the PDO status depending on how smart/correct the compiler is. The current work-around is quite fragile: because no pointers are stored in QV4::Value when using it in a host build, the two accessor methods are implemented as Q_UNREACHABLE(), and a 64bit storage scheme is forced.