Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,7 @@
};

static PyObject *
array_repr(PyObject *op)

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘array_repr’ defined but not used [-Wunused-function]

Check warning on line 2408 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘array_repr’ defined but not used [-Wunused-function]
{
char typecode;
PyObject *s, *v = NULL;
Expand Down Expand Up @@ -2433,7 +2433,7 @@
}

static PyObject*
array_subscr(PyObject *op, PyObject *item)

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘array_subscr’ defined but not used [-Wunused-function]

Check warning on line 2436 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘array_subscr’ defined but not used [-Wunused-function]
{
arrayobject *self = arrayobject_CAST(op);
array_state *state = find_array_state_by_type(Py_TYPE(self));
Expand Down Expand Up @@ -2497,7 +2497,7 @@
}

static int
array_ass_subscr(PyObject *op, PyObject *item, PyObject *value)

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘array_ass_subscr’ defined but not used [-Wunused-function]

Check warning on line 2500 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘array_ass_subscr’ defined but not used [-Wunused-function]
{
Py_ssize_t start, stop, step, slicelength, needed;
arrayobject *self = arrayobject_CAST(op);
Expand Down Expand Up @@ -2659,7 +2659,7 @@


static int
array_buffer_getbuf(PyObject *op, Py_buffer *view, int flags)

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]

Check warning on line 2662 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘array_buffer_getbuf’ defined but not used [-Wunused-function]
{
if (view == NULL) {
PyErr_SetString(PyExc_BufferError,
Expand Down Expand Up @@ -2700,7 +2700,7 @@
}

static void
array_buffer_relbuf(PyObject *op, Py_buffer *Py_UNUSED(view))

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]

Check warning on line 2703 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘array_buffer_relbuf’ defined but not used [-Wunused-function]
{
arrayobject *self = arrayobject_CAST(op);
self->ob_exports--;
Expand Down Expand Up @@ -2875,13 +2875,13 @@
}


PyDoc_STRVAR(module_doc,

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘module_doc’ defined but not used [-Wunused-const-variable=]

Check warning on line 2878 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘module_doc’ defined but not used [-Wunused-const-variable=]
"This module defines an object type which can efficiently represent\n\
an array of basic values: characters, integers, floating-point\n\
numbers. Arrays are sequence types and behave very much like lists,\n\
except that the type of objects stored in them is constrained.\n");

PyDoc_STRVAR(arraytype_doc,

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

unexpected end of file in macro expansion [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

unexpected end of file in macro expansion [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

unexpected end of file in macro expansion [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

unexpected end of file in macro expansion [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2884 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input
"array(typecode [, initializer]) -> array\n\
\n\
Return a new array whose items are restricted by typecode, and\n\
Expand All @@ -2908,9 +2908,16 @@
'f' floating-point 4\n\
'd' floating-point 8\n\
\n\
NOTE: The 'u' typecode corresponds to Python's unicode character. On\n\
narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\
\n\
"NOTE: The 'u' typecode represents a Unicode character stored using the\n"

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

missing terminating " character

Check failure on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

newline in constant [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

newline in constant [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

missing terminating " character

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

missing terminating " character

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

missing terminating " character

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

missing terminating " character

Check failure on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

newline in constant [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

missing terminating " character

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

missing terminating " character

Check failure on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

newline in constant [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2911 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

missing terminating " character
"platform's C 'wchar_t' type. Since Python 3.9, array('u') uses wchar_t\n"
"instead of the deprecated Py_UNICODE. The size of wchar_t is platform-\n"
"dependent: typically 2 bytes on Windows (UTF-16) and 4 bytes on most\n"
"Unix-like systems (UTF-32).\n"
"\n"
"The 'u' typecode has been deprecated since Python 3.3 and will be\n"
"removed in Python 3.16. Please migrate to the 'w' typecode instead,\n"
"which stores Unicode characters as Py_UCS4 (always 4 bytes).\n"
"\n"
NOTE: The 'q' and 'Q' type codes are only available if the platform\n\
C compiler used to build Python supports 'long long', or, on Windows,\n\
'__int64'.\n\
Expand Down Expand Up @@ -2938,7 +2945,7 @@
\n\
typecode -- the typecode character used to create the array\n\
itemsize -- the length in bytes of one array item\n\
");

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

missing terminating " character

Check failure on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

newline in constant [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

newline in constant [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

missing terminating " character

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

missing terminating " character

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

missing terminating " character

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

missing terminating " character

Check failure on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

newline in constant [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

missing terminating " character

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

missing terminating " character

Check failure on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

newline in constant [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2948 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

missing terminating " character

static PyObject *array_iter(PyObject *op);

Expand Down Expand Up @@ -3278,4 +3285,4 @@
PyInit_array(void)
{
return PyModuleDef_Init(&arraymodule);
}

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

unterminated argument list invoking macro "PyDoc_STRVAR"

Check failure on line 3288 in Modules/arraymodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

unterminated argument list invoking macro "PyDoc_STRVAR"
Loading