PyQt6-sip 13.6.0__tar.gz → 13.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PyQt6-sip might be problematic. Click here for more details.
- PyQt6_sip-13.9.0/LICENSE +22 -0
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/MANIFEST.in +0 -1
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/PKG-INFO +5 -7
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/PyQt6_sip.egg-info/PKG-INFO +5 -7
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/PyQt6_sip.egg-info/SOURCES.txt +0 -3
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/setup.cfg +3 -3
- PyQt6_sip-13.9.0/setup.py +23 -0
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip.h +22 -19
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_array.c +10 -16
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_array.h +4 -13
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_core.c +72 -72
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_core.h +12 -19
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_descriptors.c +4 -17
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_enum.c +4 -13
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_enum.h +4 -13
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_int_convertors.c +4 -13
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_object_map.c +10 -19
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_threads.c +3 -13
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/sip_voidptr.c +16 -15
- PyQt6_sip-13.6.0/LICENSE +0 -49
- PyQt6_sip-13.6.0/LICENSE-GPL2 +0 -344
- PyQt6_sip-13.6.0/LICENSE-GPL3 +0 -678
- PyQt6_sip-13.6.0/setup.py +0 -45
- PyQt6_sip-13.6.0/sip_bool.cpp +0 -23
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/PyQt6_sip.egg-info/dependency_links.txt +0 -0
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/PyQt6_sip.egg-info/top_level.txt +0 -0
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/README +0 -0
- {PyQt6_sip-13.6.0 → PyQt6_sip-13.9.0}/pyproject.toml +0 -0
PyQt6_sip-13.9.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
|
11
|
+
and/or other materials provided with the distribution.
|
|
12
|
+
|
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
|
|
14
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
15
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
16
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
17
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
18
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
19
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
20
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
21
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
22
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyQt6_sip
|
|
3
|
-
Version: 13.
|
|
3
|
+
Version: 13.9.0
|
|
4
4
|
Summary: The sip module support for PyQt6
|
|
5
|
-
Home-page: https://
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
5
|
+
Home-page: https://github.com/Python-SIP/sip
|
|
6
|
+
Author: Phil Thompson
|
|
7
|
+
Author-email: phil@riverbankcomputing.com
|
|
8
8
|
License: SIP
|
|
9
9
|
Platform: X11
|
|
10
10
|
Platform: macOS
|
|
11
11
|
Platform: Windows
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
License-File: LICENSE-GPL2
|
|
15
|
-
License-File: LICENSE-GPL3
|
|
16
14
|
|
|
17
15
|
sip Extension Module
|
|
18
16
|
====================
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyQt6-sip
|
|
3
|
-
Version: 13.
|
|
3
|
+
Version: 13.9.0
|
|
4
4
|
Summary: The sip module support for PyQt6
|
|
5
|
-
Home-page: https://
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
5
|
+
Home-page: https://github.com/Python-SIP/sip
|
|
6
|
+
Author: Phil Thompson
|
|
7
|
+
Author-email: phil@riverbankcomputing.com
|
|
8
8
|
License: SIP
|
|
9
9
|
Platform: X11
|
|
10
10
|
Platform: macOS
|
|
11
11
|
Platform: Windows
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
License-File: LICENSE-GPL2
|
|
15
|
-
License-File: LICENSE-GPL3
|
|
16
14
|
|
|
17
15
|
sip Extension Module
|
|
18
16
|
====================
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
description = The sip module support for PyQt6
|
|
3
3
|
long_description = file: README
|
|
4
|
-
author =
|
|
5
|
-
author_email =
|
|
6
|
-
url = https://
|
|
4
|
+
author = Phil Thompson
|
|
5
|
+
author_email = phil@riverbankcomputing.com
|
|
6
|
+
url = https://github.com/Python-SIP/sip
|
|
7
7
|
platforms = X11, macOS, Windows
|
|
8
8
|
|
|
9
9
|
[egg_info]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SPDX-License-Identifier: BSD-2-Clause
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import glob
|
|
7
|
+
|
|
8
|
+
from setuptools import Extension, setup
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Build the extension module.
|
|
12
|
+
module_src = sorted(glob.glob('*.c'))
|
|
13
|
+
|
|
14
|
+
module = Extension('PyQt6.sip', module_src)
|
|
15
|
+
|
|
16
|
+
# Do the setup.
|
|
17
|
+
setup(
|
|
18
|
+
name='PyQt6_sip',
|
|
19
|
+
version='13.9.0',
|
|
20
|
+
license='SIP',
|
|
21
|
+
python_requires='>=3.8',
|
|
22
|
+
ext_modules=[module]
|
|
23
|
+
)
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
+
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* The SIP module interface.
|
|
3
5
|
*
|
|
4
|
-
* Copyright (c)
|
|
5
|
-
*
|
|
6
|
-
* This file is part of SIP.
|
|
7
|
-
*
|
|
8
|
-
* This copy of SIP is licensed for use under the terms of the SIP License
|
|
9
|
-
* Agreement. See the file LICENSE for more details.
|
|
10
|
-
*
|
|
11
|
-
* This copy of SIP may also used under the terms of the GNU General Public
|
|
12
|
-
* License v2 or v3 as published by the Free Software Foundation which can be
|
|
13
|
-
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
|
|
14
|
-
*
|
|
15
|
-
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
6
|
+
* Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
17
7
|
*/
|
|
18
8
|
|
|
19
9
|
|
|
@@ -24,8 +14,8 @@
|
|
|
24
14
|
#include <Python.h>
|
|
25
15
|
|
|
26
16
|
/* Sanity check on the Python version. */
|
|
27
|
-
#if PY_VERSION_HEX <
|
|
28
|
-
#error "This version of PyQt6.sip requires Python v3.
|
|
17
|
+
#if PY_VERSION_HEX < 0x03090000
|
|
18
|
+
#error "This version of PyQt6.sip requires Python v3.9 or later"
|
|
29
19
|
#endif
|
|
30
20
|
|
|
31
21
|
|
|
@@ -45,13 +35,26 @@ extern "C" {
|
|
|
45
35
|
|
|
46
36
|
/* The version of the ABI. */
|
|
47
37
|
#define SIP_ABI_MAJOR_VERSION 13
|
|
48
|
-
#define SIP_ABI_MINOR_VERSION
|
|
38
|
+
#define SIP_ABI_MINOR_VERSION 9
|
|
49
39
|
#define SIP_MODULE_PATCH_VERSION 0
|
|
50
40
|
|
|
51
41
|
|
|
52
42
|
/*
|
|
53
43
|
* The change history of the ABI.
|
|
54
44
|
*
|
|
45
|
+
* v13.9
|
|
46
|
+
* - Python v3.9 or later is required.
|
|
47
|
+
* - Added a new implementation of sipDeprecated() that takes an optional
|
|
48
|
+
* supplementary message.
|
|
49
|
+
*
|
|
50
|
+
* v13.8
|
|
51
|
+
* - Added the 'I' conversion character to the argument and result parsers.
|
|
52
|
+
*
|
|
53
|
+
* v13.7
|
|
54
|
+
* - Added support for Python v3.13.
|
|
55
|
+
* - Python v3.8 or later is required.
|
|
56
|
+
* - C99 support is assumed.
|
|
57
|
+
*
|
|
55
58
|
* v13.6
|
|
56
59
|
* - Added support for Python v3.12.
|
|
57
60
|
* - Added sipPyTypeDictRef().
|
|
@@ -79,8 +82,8 @@ extern "C" {
|
|
|
79
82
|
|
|
80
83
|
|
|
81
84
|
/* The version of the code generator. */
|
|
82
|
-
#define SIP_VERSION
|
|
83
|
-
#define SIP_VERSION_STR "6.
|
|
85
|
+
#define SIP_VERSION 0x60900
|
|
86
|
+
#define SIP_VERSION_STR "6.9.0"
|
|
84
87
|
|
|
85
88
|
/* These are all dependent on the user-specified name of the sip module. */
|
|
86
89
|
#define _SIP_MODULE_FQ_NAME "PyQt6.sip"
|
|
@@ -1427,7 +1430,7 @@ typedef struct _sipAPIDef {
|
|
|
1427
1430
|
PyObject *(*api_is_py_method_12_8)(sip_gilstate_t *gil, char *pymc,
|
|
1428
1431
|
sipSimpleWrapper **sipSelfp, const char *cname, const char *mname);
|
|
1429
1432
|
sipExceptionHandler (*api_next_exception_handler)(void **statep);
|
|
1430
|
-
|
|
1433
|
+
int (*api_deprecated_13_9)(const char *classname, const char *method, const char *message);
|
|
1431
1434
|
void (*unused_private_3)(void);
|
|
1432
1435
|
void (*unused_private_4)(void);
|
|
1433
1436
|
void (*unused_private_5)(void);
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
+
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* This file implements the API for the array type.
|
|
3
5
|
*
|
|
4
|
-
* Copyright (c)
|
|
5
|
-
*
|
|
6
|
-
* This file is part of SIP.
|
|
7
|
-
*
|
|
8
|
-
* This copy of SIP is licensed for use under the terms of the SIP License
|
|
9
|
-
* Agreement. See the file LICENSE for more details.
|
|
10
|
-
*
|
|
11
|
-
* This copy of SIP may also used under the terms of the GNU General Public
|
|
12
|
-
* License v2 or v3 as published by the Free Software Foundation which can be
|
|
13
|
-
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
|
|
14
|
-
*
|
|
15
|
-
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
6
|
+
* Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
17
7
|
*/
|
|
18
8
|
|
|
19
9
|
|
|
10
|
+
/* Remove when Python v3.12 is no longer supported. */
|
|
20
11
|
#define PY_SSIZE_T_CLEAN
|
|
21
12
|
#include <Python.h>
|
|
22
13
|
|
|
@@ -320,7 +311,8 @@ static int sipArray_getbuffer(PyObject *self, Py_buffer *view, int flags)
|
|
|
320
311
|
|
|
321
312
|
view->format = NULL;
|
|
322
313
|
if ((flags & PyBUF_FORMAT) == PyBUF_FORMAT)
|
|
323
|
-
|
|
314
|
+
/* Note that the need for a cast is probably a Python bug. */
|
|
315
|
+
view->format = (char *)format;
|
|
324
316
|
|
|
325
317
|
view->ndim = 1;
|
|
326
318
|
|
|
@@ -384,7 +376,11 @@ static PyObject *sipArray_repr(PyObject *self)
|
|
|
384
376
|
*/
|
|
385
377
|
static PyObject *sipArray_new(PyTypeObject *cls, PyObject *args, PyObject *kw)
|
|
386
378
|
{
|
|
379
|
+
#if PY_VERSION_HEX >= 0x030d0000
|
|
380
|
+
static char * const kwlist[] = {"", "", NULL};
|
|
381
|
+
#else
|
|
387
382
|
static char *kwlist[] = {"", "", NULL};
|
|
383
|
+
#endif
|
|
388
384
|
|
|
389
385
|
Py_ssize_t length;
|
|
390
386
|
PyObject *array, *type;
|
|
@@ -483,9 +479,7 @@ PyTypeObject sipArray_Type = {
|
|
|
483
479
|
0, /* tp_del */
|
|
484
480
|
0, /* tp_version_tag */
|
|
485
481
|
0, /* tp_finalize */
|
|
486
|
-
#if PY_VERSION_HEX >= 0x03080000
|
|
487
482
|
0, /* tp_vectorcall */
|
|
488
|
-
#endif
|
|
489
483
|
};
|
|
490
484
|
|
|
491
485
|
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
+
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* This file defines the API for the array type.
|
|
3
5
|
*
|
|
4
|
-
* Copyright (c)
|
|
5
|
-
*
|
|
6
|
-
* This file is part of SIP.
|
|
7
|
-
*
|
|
8
|
-
* This copy of SIP is licensed for use under the terms of the SIP License
|
|
9
|
-
* Agreement. See the file LICENSE for more details.
|
|
10
|
-
*
|
|
11
|
-
* This copy of SIP may also used under the terms of the GNU General Public
|
|
12
|
-
* License v2 or v3 as published by the Free Software Foundation which can be
|
|
13
|
-
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
|
|
14
|
-
*
|
|
15
|
-
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
6
|
+
* Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
17
7
|
*/
|
|
18
8
|
|
|
19
9
|
|
|
@@ -21,6 +11,7 @@
|
|
|
21
11
|
#define _SIP_ARRAY_H
|
|
22
12
|
|
|
23
13
|
|
|
14
|
+
/* Remove when Python v3.12 is no longer supported. */
|
|
24
15
|
#define PY_SSIZE_T_CLEAN
|
|
25
16
|
#include <Python.h>
|
|
26
17
|
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
+
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* The core sip module code.
|
|
3
5
|
*
|
|
4
|
-
* Copyright (c)
|
|
5
|
-
*
|
|
6
|
-
* This file is part of SIP.
|
|
7
|
-
*
|
|
8
|
-
* This copy of SIP is licensed for use under the terms of the SIP License
|
|
9
|
-
* Agreement. See the file LICENSE for more details.
|
|
10
|
-
*
|
|
11
|
-
* This copy of SIP may also used under the terms of the GNU General Public
|
|
12
|
-
* License v2 or v3 as published by the Free Software Foundation which can be
|
|
13
|
-
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
|
|
14
|
-
*
|
|
15
|
-
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
6
|
+
* Copyright (c) 2024 Phil Thompson <phil@riverbankcomputing.com>
|
|
17
7
|
*/
|
|
18
8
|
|
|
19
9
|
|
|
10
|
+
/* Remove when Python v3.12 is no longer supported. */
|
|
20
11
|
#define PY_SSIZE_T_CLEAN
|
|
21
12
|
#include <Python.h>
|
|
22
13
|
#include <datetime.h>
|
|
@@ -34,12 +25,6 @@
|
|
|
34
25
|
#include "sip_core.h"
|
|
35
26
|
|
|
36
27
|
|
|
37
|
-
/* There doesn't seem to be a standard way of checking for C99 support. */
|
|
38
|
-
#if !defined(va_copy)
|
|
39
|
-
#define va_copy(d, s) ((d) = (s))
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
|
|
43
28
|
/*
|
|
44
29
|
* The Python metatype for a C++ wrapper type. We inherit everything from the
|
|
45
30
|
* standard Python metatype except the init and getattro methods and the size
|
|
@@ -103,9 +88,7 @@ PyTypeObject sipWrapperType_Type = {
|
|
|
103
88
|
0, /* tp_del */
|
|
104
89
|
0, /* tp_version_tag */
|
|
105
90
|
0, /* tp_finalize */
|
|
106
|
-
#if PY_VERSION_HEX >= 0x03080000
|
|
107
91
|
0, /* tp_vectorcall */
|
|
108
|
-
#endif
|
|
109
92
|
};
|
|
110
93
|
|
|
111
94
|
|
|
@@ -171,9 +154,7 @@ static sipWrapperType sipWrapper_Type = {
|
|
|
171
154
|
0, /* tp_del */
|
|
172
155
|
0, /* tp_version_tag */
|
|
173
156
|
0, /* tp_finalize */
|
|
174
|
-
#if PY_VERSION_HEX >= 0x03080000
|
|
175
157
|
0, /* tp_vectorcall */
|
|
176
|
-
#endif
|
|
177
158
|
},
|
|
178
159
|
{
|
|
179
160
|
0, /* am_await */
|
|
@@ -246,9 +227,7 @@ static sipWrapperType sipWrapper_Type = {
|
|
|
246
227
|
0, /* ht_slots */
|
|
247
228
|
0, /* ht_qualname */
|
|
248
229
|
0, /* ht_cached_keys */
|
|
249
|
-
#if PY_VERSION_HEX >= 0x03090000
|
|
250
230
|
0, /* ht_module */
|
|
251
|
-
#endif
|
|
252
231
|
#if !defined(STACKLESS)
|
|
253
232
|
},
|
|
254
233
|
#endif
|
|
@@ -566,7 +545,7 @@ static const sipAPIDef sip_api = {
|
|
|
566
545
|
sip_api_instance_destroyed_ex,
|
|
567
546
|
sip_api_is_py_method_12_8,
|
|
568
547
|
sip_api_next_exception_handler,
|
|
569
|
-
|
|
548
|
+
sip_api_deprecated_13_9,
|
|
570
549
|
NULL,
|
|
571
550
|
NULL,
|
|
572
551
|
NULL,
|
|
@@ -893,10 +872,6 @@ const sipAPIDef *sip_init_library(PyObject *mod_dict)
|
|
|
893
872
|
PyObject *obj;
|
|
894
873
|
PyMethodDef *md;
|
|
895
874
|
|
|
896
|
-
#if PY_VERSION_HEX < 0x03070000 && defined(WITH_THREAD)
|
|
897
|
-
PyEval_InitThreads();
|
|
898
|
-
#endif
|
|
899
|
-
|
|
900
875
|
if (sip_enum_init() < 0)
|
|
901
876
|
return NULL;
|
|
902
877
|
|
|
@@ -2321,7 +2296,7 @@ static PyObject *buildObject(PyObject *obj, const char *fmt, va_list va)
|
|
|
2321
2296
|
break;
|
|
2322
2297
|
|
|
2323
2298
|
case '=':
|
|
2324
|
-
el =
|
|
2299
|
+
el = PyLong_FromSize_t(va_arg(va, size_t));
|
|
2325
2300
|
break;
|
|
2326
2301
|
|
|
2327
2302
|
case 'N':
|
|
@@ -2614,7 +2589,7 @@ static int parseResult(PyObject *method, PyObject *res,
|
|
|
2614
2589
|
case 'a':
|
|
2615
2590
|
{
|
|
2616
2591
|
char *p = va_arg(va, char *);
|
|
2617
|
-
int enc;
|
|
2592
|
+
int enc = -1;
|
|
2618
2593
|
|
|
2619
2594
|
switch (*fmt++)
|
|
2620
2595
|
{
|
|
@@ -2629,9 +2604,6 @@ static int parseResult(PyObject *method, PyObject *res,
|
|
|
2629
2604
|
case '8':
|
|
2630
2605
|
enc = parseString_AsUTF8Char(arg, p);
|
|
2631
2606
|
break;
|
|
2632
|
-
|
|
2633
|
-
default:
|
|
2634
|
-
enc = -1;
|
|
2635
2607
|
}
|
|
2636
2608
|
|
|
2637
2609
|
if (enc < 0)
|
|
@@ -2695,6 +2667,19 @@ static int parseResult(PyObject *method, PyObject *res,
|
|
|
2695
2667
|
|
|
2696
2668
|
break;
|
|
2697
2669
|
|
|
2670
|
+
case 'I':
|
|
2671
|
+
{
|
|
2672
|
+
char *p = va_arg(va, char *);
|
|
2673
|
+
char v = sip_api_long_as_char(arg);
|
|
2674
|
+
|
|
2675
|
+
if (PyErr_Occurred())
|
|
2676
|
+
invalid = TRUE;
|
|
2677
|
+
else if (p != NULL)
|
|
2678
|
+
*p = v;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
break;
|
|
2682
|
+
|
|
2698
2683
|
case 'L':
|
|
2699
2684
|
{
|
|
2700
2685
|
signed char *p = va_arg(va, signed char *);
|
|
@@ -2855,7 +2840,7 @@ static int parseResult(PyObject *method, PyObject *res,
|
|
|
2855
2840
|
{
|
|
2856
2841
|
int key = va_arg(va, int);
|
|
2857
2842
|
const char **p = va_arg(va, const char **);
|
|
2858
|
-
PyObject *keep;
|
|
2843
|
+
PyObject *keep = NULL;
|
|
2859
2844
|
|
|
2860
2845
|
switch (*fmt++)
|
|
2861
2846
|
{
|
|
@@ -2870,9 +2855,6 @@ static int parseResult(PyObject *method, PyObject *res,
|
|
|
2870
2855
|
case '8':
|
|
2871
2856
|
keep = parseString_AsUTF8String(arg, p);
|
|
2872
2857
|
break;
|
|
2873
|
-
|
|
2874
|
-
default:
|
|
2875
|
-
keep = NULL;
|
|
2876
2858
|
}
|
|
2877
2859
|
|
|
2878
2860
|
if (keep == NULL)
|
|
@@ -4322,9 +4304,28 @@ static int parsePass1(PyObject **parseErrp, PyObject **selfp, int *selfargp,
|
|
|
4322
4304
|
break;
|
|
4323
4305
|
}
|
|
4324
4306
|
|
|
4307
|
+
case 'I':
|
|
4308
|
+
{
|
|
4309
|
+
/* Char as an integer. */
|
|
4310
|
+
|
|
4311
|
+
char *p = va_arg(va, char *);
|
|
4312
|
+
|
|
4313
|
+
if (arg != NULL)
|
|
4314
|
+
{
|
|
4315
|
+
char v = sip_api_long_as_char(arg);
|
|
4316
|
+
|
|
4317
|
+
if (PyErr_Occurred())
|
|
4318
|
+
handle_failed_int_conversion(&failure, arg);
|
|
4319
|
+
else
|
|
4320
|
+
*p = v;
|
|
4321
|
+
}
|
|
4322
|
+
|
|
4323
|
+
break;
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4325
4326
|
case 'L':
|
|
4326
4327
|
{
|
|
4327
|
-
/* Signed char. */
|
|
4328
|
+
/* Signed char as an integer. */
|
|
4328
4329
|
|
|
4329
4330
|
signed char *p = va_arg(va, signed char *);
|
|
4330
4331
|
|
|
@@ -4343,7 +4344,7 @@ static int parsePass1(PyObject **parseErrp, PyObject **selfp, int *selfargp,
|
|
|
4343
4344
|
|
|
4344
4345
|
case 'M':
|
|
4345
4346
|
{
|
|
4346
|
-
/* Unsigned char. */
|
|
4347
|
+
/* Unsigned char as an integer. */
|
|
4347
4348
|
|
|
4348
4349
|
unsigned char *p = va_arg(va, unsigned char *);
|
|
4349
4350
|
|
|
@@ -4943,6 +4944,8 @@ static int parsePass2(PyObject *self, int selfarg, PyObject *sipArgs,
|
|
|
4943
4944
|
|
|
4944
4945
|
if (flags & FMT_AP_TRANSFER_THIS)
|
|
4945
4946
|
owner = va_arg(va, PyObject **);
|
|
4947
|
+
else
|
|
4948
|
+
owner = NULL;
|
|
4946
4949
|
|
|
4947
4950
|
if (flags & FMT_AP_NO_CONVERTORS)
|
|
4948
4951
|
{
|
|
@@ -4969,7 +4972,7 @@ static int parsePass2(PyObject *self, int selfarg, PyObject *sipArgs,
|
|
|
4969
4972
|
if (iserr)
|
|
4970
4973
|
return FALSE;
|
|
4971
4974
|
|
|
4972
|
-
if (
|
|
4975
|
+
if (owner != NULL && *p != NULL)
|
|
4973
4976
|
*owner = arg;
|
|
4974
4977
|
}
|
|
4975
4978
|
|
|
@@ -5057,7 +5060,7 @@ static int parsePass2(PyObject *self, int selfarg, PyObject *sipArgs,
|
|
|
5057
5060
|
|
|
5058
5061
|
if (arg != NULL)
|
|
5059
5062
|
{
|
|
5060
|
-
int enc;
|
|
5063
|
+
int enc = -1;
|
|
5061
5064
|
|
|
5062
5065
|
switch (sub_fmt)
|
|
5063
5066
|
{
|
|
@@ -6663,6 +6666,16 @@ static void sip_api_abstract_method(const char *classname, const char *method)
|
|
|
6663
6666
|
* Report a deprecated class or method.
|
|
6664
6667
|
*/
|
|
6665
6668
|
int sip_api_deprecated(const char *classname, const char *method)
|
|
6669
|
+
{
|
|
6670
|
+
return sip_api_deprecated_13_9(classname, method, NULL);
|
|
6671
|
+
}
|
|
6672
|
+
|
|
6673
|
+
|
|
6674
|
+
/*
|
|
6675
|
+
* Report a deprecated class or method with an optional message.
|
|
6676
|
+
*/
|
|
6677
|
+
int sip_api_deprecated_13_9(const char *classname, const char *method,
|
|
6678
|
+
const char *message)
|
|
6666
6679
|
{
|
|
6667
6680
|
char buf[100];
|
|
6668
6681
|
|
|
@@ -6673,7 +6686,10 @@ int sip_api_deprecated(const char *classname, const char *method)
|
|
|
6673
6686
|
classname);
|
|
6674
6687
|
else
|
|
6675
6688
|
PyOS_snprintf(buf, sizeof (buf), "%s.%s() is deprecated", classname,
|
|
6676
|
-
method);
|
|
6689
|
+
method );
|
|
6690
|
+
|
|
6691
|
+
if (message != NULL)
|
|
6692
|
+
PyOS_snprintf(&buf[strlen(buf)], sizeof (buf), ": %s", message);
|
|
6677
6693
|
|
|
6678
6694
|
return PyErr_WarnEx(PyExc_DeprecationWarning, buf, 1);
|
|
6679
6695
|
}
|
|
@@ -9503,6 +9519,10 @@ static PyObject *slot_richcompare(PyObject *self, PyObject *arg, int op)
|
|
|
9503
9519
|
case Py_GE:
|
|
9504
9520
|
st = ge_slot;
|
|
9505
9521
|
break;
|
|
9522
|
+
|
|
9523
|
+
default:
|
|
9524
|
+
/* Suppress a compiler warning. */
|
|
9525
|
+
st = -1;
|
|
9506
9526
|
}
|
|
9507
9527
|
|
|
9508
9528
|
/* It might not exist if not all the above have been implemented. */
|
|
@@ -9632,9 +9652,7 @@ sipWrapperType sipSimpleWrapper_Type = {
|
|
|
9632
9652
|
0, /* tp_del */
|
|
9633
9653
|
0, /* tp_version_tag */
|
|
9634
9654
|
0, /* tp_finalize */
|
|
9635
|
-
#if PY_VERSION_HEX >= 0x03080000
|
|
9636
9655
|
0, /* tp_vectorcall */
|
|
9637
|
-
#endif
|
|
9638
9656
|
},
|
|
9639
9657
|
{
|
|
9640
9658
|
0, /* am_await */
|
|
@@ -9707,9 +9725,7 @@ sipWrapperType sipSimpleWrapper_Type = {
|
|
|
9707
9725
|
0, /* ht_slots */
|
|
9708
9726
|
0, /* ht_qualname */
|
|
9709
9727
|
0, /* ht_cached_keys */
|
|
9710
|
-
#if PY_VERSION_HEX >= 0x03090000
|
|
9711
9728
|
0, /* ht_module */
|
|
9712
|
-
#endif
|
|
9713
9729
|
#if !defined(STACKLESS)
|
|
9714
9730
|
},
|
|
9715
9731
|
#endif
|
|
@@ -11453,7 +11469,6 @@ static void *sip_api_unicode_data(PyObject *obj, int *char_size,
|
|
|
11453
11469
|
*/
|
|
11454
11470
|
static int sip_api_get_buffer_info(PyObject *obj, sipBufferInfoDef *bi)
|
|
11455
11471
|
{
|
|
11456
|
-
int rc;
|
|
11457
11472
|
Py_buffer *buffer;
|
|
11458
11473
|
|
|
11459
11474
|
if (!PyObject_CheckBuffer(obj))
|
|
@@ -11467,27 +11482,16 @@ static int sip_api_get_buffer_info(PyObject *obj, sipBufferInfoDef *bi)
|
|
|
11467
11482
|
|
|
11468
11483
|
buffer = (Py_buffer *)bi->bi_internal;
|
|
11469
11484
|
|
|
11470
|
-
if (PyObject_GetBuffer(obj, buffer,
|
|
11485
|
+
if (PyObject_GetBuffer(obj, buffer, PyBUF_SIMPLE) < 0)
|
|
11471
11486
|
return -1;
|
|
11472
11487
|
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
bi->bi_readonly = buffer->readonly;
|
|
11479
|
-
bi->bi_format = buffer->format;
|
|
11480
|
-
|
|
11481
|
-
rc = 1;
|
|
11482
|
-
}
|
|
11483
|
-
else
|
|
11484
|
-
{
|
|
11485
|
-
PyErr_SetString(PyExc_TypeError, "a 1-dimensional buffer is required");
|
|
11486
|
-
PyBuffer_Release(buffer);
|
|
11487
|
-
rc = -1;
|
|
11488
|
-
}
|
|
11488
|
+
bi->bi_buf = buffer->buf;
|
|
11489
|
+
bi->bi_obj = buffer->obj;
|
|
11490
|
+
bi->bi_len = buffer->len;
|
|
11491
|
+
bi->bi_readonly = buffer->readonly;
|
|
11492
|
+
bi->bi_format = buffer->format;
|
|
11489
11493
|
|
|
11490
|
-
return
|
|
11494
|
+
return 1;
|
|
11491
11495
|
}
|
|
11492
11496
|
|
|
11493
11497
|
|
|
@@ -11823,22 +11827,18 @@ PyObject *sip_get_qualname(const sipTypeDef *td, PyObject *name)
|
|
|
11823
11827
|
|
|
11824
11828
|
|
|
11825
11829
|
/*
|
|
11826
|
-
*
|
|
11830
|
+
* Unpack a slice object.
|
|
11827
11831
|
*/
|
|
11828
11832
|
int sip_api_convert_from_slice_object(PyObject *slice, Py_ssize_t length,
|
|
11829
11833
|
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
|
|
11830
11834
|
Py_ssize_t *slicelength)
|
|
11831
11835
|
{
|
|
11832
|
-
#if PY_VERSION_HEX >= 0x03070000
|
|
11833
11836
|
if (PySlice_Unpack(slice, start, stop, step) < 0)
|
|
11834
11837
|
return -1;
|
|
11835
11838
|
|
|
11836
11839
|
*slicelength = PySlice_AdjustIndices(length, start, stop, *step);
|
|
11837
11840
|
|
|
11838
11841
|
return 0;
|
|
11839
|
-
#else
|
|
11840
|
-
return PySlice_GetIndicesEx(slice, length, start, stop, step, slicelength);
|
|
11841
|
-
#endif
|
|
11842
11842
|
}
|
|
11843
11843
|
|
|
11844
11844
|
|