10000 remove test tags · python/cpython@7e7627f · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e7627f

Browse files
remove test tags
1 parent a6275f1 commit 7e7627f

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

Include/cpython/tupleobject.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ PyTuple_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
3232
PyTupleObject *tuple = _PyTuple_CAST(op);
3333
assert(0 <= index);
3434
assert(index < Py_SIZE(tuple));
35-
#ifdef Py_TAG_TEST
36-
// Make sure it's not a tagged pointer
37-
assert(((uintptr_t)op & Py_TAG_TEST) == 0);
38-
#endif
3935
tuple->ob_item[index] = value;
4036
}
4137
#define PyTuple_SET_ITEM(op, index, value) \

Objects/call.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ PyObject *
10711071
PyObject_Vectorcall_Tagged(PyObject *callable,
10721072
const _PyStackRef *tagged, size_t nargsf, PyObject *kwnames)
10731073
{
1074-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
1074+
#if defined(Py_GIL_DISABLED)
10751075
size_t nargs = nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
10761076
if (kwnames != NULL) {
10771077
assert(PyTuple_CheckExact(kwnames));
@@ -1112,7 +1112,7 @@ PyObject *
11121112
PyObject_TypeVectorcall_Tagged(PyTypeObject *callable,
11131113
const _PyStackRef *tagged, size_t nargsf, PyObject *kwnames)
11141114
{
1115-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
1115+
#if defined(Py_GIL_DISABLED)
11161116
size_t nargs = nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
11171117
PyObject *args[MAX_UNTAG_SCRATCH];
11181118
if (nargs >= MAX_UNTAG_SCRATCH) {
@@ -1149,7 +1149,7 @@ PyObject_PyCFunctionFastCall_Tagged(PyCFunctionFast cfunc,
11491149
PyObject *self,
11501150
const _PyStackRef *tagged, Py_ssize_t nargsf)
11511151
{
1152-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
1152+
#if defined(Py_GIL_DISABLED)
11531153
size_t nargs = nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
11541154
PyObject *args[MAX_UNTAG_SCRATCH];
11551155
if (nargs >= MAX_UNTAG_SCRATCH) {
@@ -1187,7 +1187,7 @@ PyObject_PyCFunctionFastWithKeywordsCall_Tagged(PyCFunctionFastWithKeywords cfun
11871187
const _PyStackRef *tagged, Py_ssize_t nargsf,
11881188
PyObject *kwds)
11891189
{
1190-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
1190+
#if defined(Py_GIL_DISABLED)
11911191
size_t nargs = nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
11921192
PyObject *args[MAX_UNTAG_SCRATCH];
11931193
if (nargs >= MAX_UNTAG_SCRATCH) {

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9756,7 +9756,7 @@ _PyUnicode_JoinStack_Slow(PyObject *separator, _PyStackRef const *tagged, Py_ssi
97569756
PyObject *
97579757
_PyUnicode_JoinStack(PyObject *separator, _PyStackRef const *items_tagged, Py_ssize_t seqlen)
97589758
{
9759-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
9759+
#if defined(Py_GIL_DISABLED)
97609760
PyObject *args[MAX_UNTAG_SCRATCH];
97619761
if (seqlen > MAX_UNTAG_SCRATCH) {
97629762
return _PyUnicode_JoinStack_Slow(separator, items_tagged, seqlen);

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,7 @@ _PyEvalFramePushAndInit_UnTagged(PyThreadState *tstate, PyFunctionObject *func,
17481748
PyObject *locals, PyObject *const* args,
17491749
size_t argcount, PyObject *kwnames)
17501750
{
1751-
#if defined(Py_GIL_DISABLED) || defined(Py_TAG_TEST)
1751+
#if defined(Py_GIL_DISABLED)
17521752
size_t kw_count = kwnames == NULL ? 0 : PyTuple_GET_SIZE(kwnames);
17531753
size_t total_argcount = argcount + kw_count;
17541754
_PyStackRef *tagged_args_buffer = PyMem_Malloc(sizeof(_PyStackRef) * total_argcount);

0 commit comments

Comments
 (0)
0