Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions Include/internal/pycore_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ extern PyStatus _PyTuple_InitGlobalObjects(PyInterpreterState *);

#define _PyTuple_ITEMS(op) _Py_RVALUE(_PyTuple_CAST(op)->ob_item)

// Alias for backward compatibility
#define _PyTuple_FromArray PyTuple_FromArray

PyAPI_FUNC(PyObject *)_PyTuple_FromStackRefStealOnSuccess(const union _PyStackRef *, Py_ssize_t);
PyAPI_FUNC(PyObject *)_PyTuple_FromArraySteal(PyObject *const *, Py_ssize_t);

Expand Down
16 changes: 8 additions & 8 deletions Lib/test/clinic.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4341,7 +4341,7 @@ test_vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t narg
goto exit;
}
a = args[0];
__clinic_args = _PyTuple_FromArray(args + 1, nargs - 1);
__clinic_args = PyTuple_FromArray(args + 1, nargs - 1);
if (__clinic_args == NULL) {
goto exit;
}
Expand All @@ -4356,7 +4356,7 @@ test_vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t narg

static PyObject *
test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args)
/*[clinic end generated code: output=0c11c475e240869e input=2c49a482f68545c0]*/
/*[clinic end generated code: output=83cbe9554d04add2 input=2c49a482f68545c0]*/

/*[clinic input]
test_vararg
Expand Down Expand Up @@ -4421,7 +4421,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject
}
a = fastargs[0];
__clinic_args = nargs > 1
? _PyTuple_FromArray(args + 1, nargs - 1)
? PyTuple_FromArray(args + 1, nargs - 1)
: PyTuple_New(0);
if (__clinic_args == NULL) {
goto exit;
Expand All @@ -4437,7 +4437,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject

static PyObject *
test_vararg_impl(PyObject *module, PyObject *a, PyObject *args)
/*[clinic end generated code: output=17ba625cdd0369c1 input=7448995636d9186a]*/
/*[clinic end generated code: output=d773f7b54e61f73a input=7448995636d9186a]*/

/*[clinic input]
test_vararg_with_default
Expand Down Expand Up @@ -4514,7 +4514,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar
}
skip_optional_kwonly:
__clinic_args = nargs > 1
? _PyTuple_FromArray(args + 1, nargs - 1)
? PyTuple_FromArray(args + 1, nargs - 1)
: PyTuple_New(0);
if (__clinic_args == NULL) {
goto exit;
Expand All @@ -4531,7 +4531,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar
static PyObject *
test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
int b)
/*[clinic end generated code: output=3f2b06ab08d5d0be input=3a0f9f557ce1f712]*/
/*[clinic end generated code: output=d25e56802c197344 input=3a0f9f557ce1f712]*/

/*[clinic input]
test_vararg_with_only_defaults
Expand Down Expand Up @@ -4612,7 +4612,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize
}
c = fastargs[1];
skip_optional_kwonly:
__clinic_args = _PyTuple_FromArray(args, nargs);
__clinic_args = PyTuple_FromArray(args, nargs);
if (__clinic_args == NULL) {
goto exit;
}
Expand All @@ -4628,7 +4628,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize
static PyObject *
test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
PyObject *c)
/*[clinic end generated code: output=f46666f0b1bf86b9 input=6983e66817f82924]*/
/*[clinic end generated code: output=7366943a7df42e05 input=6983e66817f82924]*/

/*[clinic input]
test_paramname_module
Expand Down
6 changes: 3 additions & 3 deletions Modules/_testclinic.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pack_arguments_2pos_varpos(PyObject *a, PyObject *b,
PyObject * const *args, Py_ssize_t args_length)
/*[clinic end generated code: output=267032f41bd039cc input=86ee3064b7853e86]*/
{
PyObject *tuple = _PyTuple_FromArray(args, args_length);
PyObject *tuple = PyTuple_FromArray(args, args_length);
if (tuple == NULL) {
return NULL;
}
Expand Down Expand Up @@ -1174,7 +1174,7 @@ varpos_array_impl(PyObject *module, PyObject * const *args,
Py_ssize_t args_length)
/*[clinic end generated code: output=a25f42f39c9b13ad input=97b8bdcf87e019c7]*/
{
return _PyTuple_FromArray(args, args_length);
return PyTuple_FromArray(args, args_length);
}


Expand Down Expand Up @@ -1610,7 +1610,7 @@ _testclinic_TestClass_varpos_array_no_fastcall_impl(PyTypeObject *type,
Py_ssize_t args_length)
/*[clinic end generated code: output=27c9da663e942617 input=9ba5ae1f1eb58777]*/
{
return _PyTuple_FromArray(args, args_length);
return PyTuple_FromArray(args, args_length);
}


Expand Down
34 changes: 17 additions & 17 deletions Modules/clinic/_testclinic.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/clinic/_testclinic_depr.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Modules/clinic/_testclinic_kwds.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Modules/clinic/gcmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "pycore_gc.h"
#include "pycore_object.h" // _PyObject_IS_GC()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_tuple.h" // _PyTuple_FromArray()

typedef struct _gc_runtime_state GCState;

Expand Down
8 changes: 4 additions & 4 deletions Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,7 @@ product_next_lock_held(PyObject *op)
/* Copy the previous result tuple or re-use it if available */
if (Py_REFCNT(result) > 1) {
PyObject *old_result = result;
result = _PyTuple_FromArray(_PyTuple_ITEMS(old_result), npools);
result = PyTuple_FromArray(_PyTuple_ITEMS(old_result), npools);
if (result == NULL)
goto empty;
lz->result = result;
Expand Down Expand Up @@ -2366,7 +2366,7 @@ combinations_next_lock_held(PyObject *op)
/* Copy the previous result tuple or re-use it if available */
if (Py_REFCNT(result) > 1) {
PyObject *old_result = result;
result = _PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
result = PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
if (result == NULL)
goto empty;
co->result = result;
Expand Down Expand Up @@ -2620,7 +2620,7 @@ cwr_next(PyObject *op)
/* Copy the previous result tuple or re-use it if available */
if (Py_REFCNT(result) > 1) {
PyObject *old_result = result;
result = _PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
result = PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
if (result == NULL)
goto empty;
co->result = result;
Expand Down Expand Up @@ -2881,7 +2881,7 @@ permutations_next(PyObject *op)
/* Copy the previous result tuple or re-use it if available */
if (Py_REFCNT(result) > 1) {
PyObject *old_result = result;
result = _PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
result = PyTuple_FromArray(_PyTuple_ITEMS(old_result), r);
if (result == NULL)
goto empty;
po->result = result;
Expand Down
2 changes: 1 addition & 1 deletion Objects/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ _PyObject_MakeTpCall(PyThreadState *tstate, PyObject *callable,
return NULL;
}

PyObject *argstuple = _PyTuple_FromArray(args, nargs);
PyObject *argstuple = PyTuple_FromArray(args, nargs);
if (argstuple == NULL) {
return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions Objects/descrobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ method_vectorcall_VARARGS(
if (method_check_args(func, args, nargs, kwnames)) {
return NULL;
}
PyObject *argstuple = _PyTuple_FromArray(args+1, nargs-1);
PyObject *argstuple = PyTuple_FromArray(args+1, nargs-1);
if (argstuple == NULL) {
return NULL;
}
Expand All @@ -338,7 +338,7 @@ method_vectorcall_VARARGS_KEYWORDS(
if (method_check_args(func, args, nargs, NULL)) {
return NULL;
}
PyObject *argstuple = _PyTuple_FromArray(args+1, nargs-1);
PyObject *argstuple = PyTuple_FromArray(args+1, nargs-1);
if (argstuple == NULL) {
return NULL;
}
Expand Down
Loading
Loading