From be491913c036b148cd4f90fa0132e269a507dbad Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 12 Jul 2016 14:19:09 +0200 Subject: Fix endian support in compiled data structures The goal is to make the compiled data structures persistent on disk. In order to make it possible to create these data structures on a "host" system that may have a different endianness than the target system, we now make all the word sized fields little-endian. The template wrappers from QJson provide zero-overhead access for little-endian machines (the vast majority) while maintaining a large degree of source compatibility. Change-Id: I3d30da1fcf3bffb98dbe9337d3a35482fb7b57c8 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlobjectcreator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlobjectcreator.cpp') diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 94e81cdcc7..3d2c143295 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -999,7 +999,7 @@ void QQmlObjectCreator::setupFunctions() QV4::ScopedValue function(scope); QV4::ScopedContext qmlContext(scope, currentQmlContext()); - const quint32 *functionIdx = _compiledObject->functionOffsetTable(); + const QV4::CompiledData::LEUInt32 *functionIdx = _compiledObject->functionOffsetTable(); for (quint32 i = 0; i < _compiledObject->nFunctions; ++i, ++functionIdx) { QV4::Function *runtimeFunction = compilationUnit->runtimeFunctions[*functionIdx]; const QString name = runtimeFunction->name()->toQString(); -- cgit v1.2.3