[Development] Renaming quint128

Ivan Solovev ivan.solovev at qt.io
Fri Nov 18 12:54:46 CET 2022


Hi Thiago,

> I was working on extended integers and added qint128 and quint128 to qglobal.h
(qtypes.h)

Can you provide a link to your WIP patch? I tried to search but couldn't find it in gerrit.

> it's used in the API, with a constructor and a toUInt128(), but that's
all. It's also not documented.

There are also many usages in the private API, plus some helper functions relying
on the fact that quint128 is a struct. So porting QtBluetooth to the new types might
require a bit more than fixing two methods.

> There's a way to replace it without breaking BC or SC:
1) on 64-bit systems with GCC and Clang, use the actual integer type
2) everywhere else, use the the struct
3) for QtBluetooth's own build, add a removed_api.cpp that also #undef
__SIZEOF_INT128__

This should work, but we need to make some experiments.
Are you planning to introduce q{u}int128 for 6.5 or for 6.6?

We are quite busy with other tasks before FF now, so I'm not sure
if we have time for that.

Best regards,
Ivan

________________________________
From: Development <development-bounces at qt-project.org> on behalf of Thiago Macieira <thiago.macieira at intel.com>
Sent: Friday, November 18, 2022 3:13 AM
To: development at qt-project.org <development at qt-project.org>
Subject: [Development] Renaming quint128

I was working on extended integers and added qint128 and quint128 to qglobal.h
(qtypes.h), but when I tried to rebuild all of Qt today, I found out that
QtBluetooth has this in qbluetoothuuid.h:

struct quint128
{
    quint8 data[16];
};

And it's used in the API, with a constructor and a toUInt128(), but that's
all. It's also not documented.

I'd like to move it away so I can add the proper integer.

There's a way to replace it without breaking BC or SC:
1) on 64-bit systems with GCC and Clang, use the actual integer type
2) everywhere else, use the the struct
3) for QtBluetooth's own build, add a removed_api.cpp that also #undef
__SIZEOF_INT128__

It might be a good idea to move that backup definition to QtCore, so
QtBluetooth isn't depending on just how qtypes.h does it.
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering



_______________________________________________
Development mailing list
Development at qt-project.org
https://lists.qt-project.org/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20221118/3a37e490/attachment.htm>


More information about the Development mailing list