diff options
| author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2024-11-13 14:45:33 +0100 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2024-11-20 14:29:41 +0100 |
| commit | 5b51fb868f3c9a0550ef1ec688d1e6c77cc9e796 (patch) | |
| tree | fdd7d8337a1122bc11034794c0a8744ee6aeb41f | |
| parent | 6132d3914dc89ab76c64755441386ab9927f5e27 (diff) | |
limited api: remove macro declaration from header
This is a continuation of the previous patches that were
replacing the usage of macros for: lists, tuple, bytes, and float
in the code, by the equivalent functions.
[ChangeLog][PySide6] For the limited api builds (wheels) PySide had in
place aliases from Python macros to their function equivalent. This is
now removed, in favor of using the functions directly.
Change-Id: I838bebac80067e3094b2a0dfadd1614f9644f7ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| -rw-r--r-- | sources/pyside6/doc/developer/limited_api.rst | 19 | ||||
| -rw-r--r-- | sources/shiboken6/libshiboken/pep384impl.h | 30 |
2 files changed, 0 insertions, 49 deletions
diff --git a/sources/pyside6/doc/developer/limited_api.rst b/sources/pyside6/doc/developer/limited_api.rst index a346c1a86..a32b73fe2 100644 --- a/sources/pyside6/doc/developer/limited_api.rst +++ b/sources/pyside6/doc/developer/limited_api.rst @@ -71,25 +71,6 @@ that calls ``_PepUnicode_AsString``. The implementation was a bit involved, and it would be better to change the code and replace this function. -bytesobject.h -~~~~~~~~~~~~~ - -The macros ``PyBytes_AS_STRING`` and ``PyBytes_GET_SIZE`` were redefined to call -the according functions. - - -floatobject.h -~~~~~~~~~~~~~ - -``PyFloat_AS_DOUBLE`` now calls ``PyFloat_AsDouble``. - - -tupleobject.h -~~~~~~~~~~~~~ - -``PyTuple_GET_ITEM``, ``PyTuple_SET_ITEM`` and ``PyTuple_GET_SIZE`` were redefined as -function calls. - dictobject.h ~~~~~~~~~~~~ diff --git a/sources/shiboken6/libshiboken/pep384impl.h b/sources/shiboken6/libshiboken/pep384impl.h index 499491f6d..dd4b66ecc 100644 --- a/sources/shiboken6/libshiboken/pep384impl.h +++ b/sources/shiboken6/libshiboken/pep384impl.h @@ -267,36 +267,6 @@ enum PepUnicode_Kind { /***************************************************************************** * - * RESOLVED: bytesobject.h - * - */ -#ifdef Py_LIMITED_API -#define PyBytes_AS_STRING(op) PyBytes_AsString(op) -#define PyBytes_GET_SIZE(op) PyBytes_Size(op) -#endif - -/***************************************************************************** - * - * RESOLVED: floatobject.h - * - */ -#ifdef Py_LIMITED_API -#define PyFloat_AS_DOUBLE(op) PyFloat_AsDouble(op) -#endif - -/***************************************************************************** - * - * RESOLVED: tupleobject.h - * - */ -#ifdef Py_LIMITED_API -#define PyTuple_GET_ITEM(op, i) PyTuple_GetItem((PyObject *)op, i) -#define PyTuple_SET_ITEM(op, i, v) PyTuple_SetItem(op, i, v) -#define PyTuple_GET_SIZE(op) PyTuple_Size((PyObject *)op) -#endif - -/***************************************************************************** - * * RESOLVED: methodobject.h * */ |
