Skip to content

Commit

Permalink
Fixup Objects/ and Python/ files
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Jan 3, 2025
1 parent 7daeccd commit dada02d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 39 deletions.
30 changes: 15 additions & 15 deletions Objects/clinic/codeobject.c.h

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

30 changes: 15 additions & 15 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,24 +2208,24 @@ code_branchesiterator(PyCodeObject *code, PyObject *Py_UNUSED(args))
code.replace
*
co_argcount: int(c_default="self->co_argcount") = unchanged
co_posonlyargcount: int(c_default="self->co_posonlyargcount") = unchanged
co_kwonlyargcount: int(c_default="self->co_kwonlyargcount") = unchanged
co_nlocals: int(c_default="self->co_nlocals") = unchanged
co_stacksize: int(c_default="self->co_stacksize") = unchanged
co_flags: int(c_default="self->co_flags") = unchanged
co_firstlineno: int(c_default="self->co_firstlineno") = unchanged
co_argcount: int(c_default="((PyCodeObject *)self)->co_argcount") = unchanged
co_posonlyargcount: int(c_default="((PyCodeObject *)self)->co_posonlyargcount") = unchanged
co_kwonlyargcount: int(c_default="((PyCodeObject *)self)->co_kwonlyargcount") = unchanged
co_nlocals: int(c_default="((PyCodeObject *)self)->co_nlocals") = unchanged
co_stacksize: int(c_default="((PyCodeObject *)self)->co_stacksize") = unchanged
co_flags: int(c_default="((PyCodeObject *)self)->co_flags") = unchanged
co_firstlineno: int(c_default="((PyCodeObject *)self)->co_firstlineno") = unchanged
co_code: object(subclass_of="&PyBytes_Type", c_default="NULL") = unchanged
co_consts: object(subclass_of="&PyTuple_Type", c_default="self->co_consts") = unchanged
co_names: object(subclass_of="&PyTuple_Type", c_default="self->co_names") = unchanged
co_consts: object(subclass_of="&PyTuple_Type", c_default="((PyCodeObject *)self)->co_consts") = unchanged
co_names: object(subclass_of="&PyTuple_Type", c_default="((PyCodeObject *)self)->co_names") = unchanged
co_varnames: object(subclass_of="&PyTuple_Type", c_default="NULL") = unchanged
co_freevars: object(subclass_of="&PyTuple_Type", c_default="NULL") = unchanged
co_cellvars: object(subclass_of="&PyTuple_Type", c_default="NULL") = unchanged
co_filename: unicode(c_default="self->co_filename") = unchanged
co_name: unicode(c_default="self->co_name") = unchanged
co_qualname: unicode(c_default="self->co_qualname") = unchanged
co_linetable: object(subclass_of="&PyBytes_Type", c_default="self->co_linetable") = unchanged
co_exceptiontable: object(subclass_of="&PyBytes_Type", c_default="self->co_exceptiontable") = unchanged
co_filename: unicode(c_default="((PyCodeObject *)self)->co_filename") = unchanged
co_name: unicode(c_default="((PyCodeObject *)self)->co_name") = unchanged
co_qualname: unicode(c_default="((PyCodeObject *)self)->co_qualname") = unchanged
co_linetable: object(subclass_of="&PyBytes_Type", c_default="((PyCodeObject *)self)->co_linetable") = unchanged
co_exceptiontable: object(subclass_of="&PyBytes_Type", c_default="((PyCodeObject *)self)->co_exceptiontable") = unchanged
Return a copy of the code object with new values for the specified fields.
[clinic start generated code]*/
Expand All @@ -2240,7 +2240,7 @@ code_replace_impl(PyCodeObject *self, int co_argcount,
PyObject *co_filename, PyObject *co_name,
PyObject *co_qualname, PyObject *co_linetable,
PyObject *co_exceptiontable)
/*[clinic end generated code: output=e75c48a15def18b9 input=18e280e07846c122]*/
/*[clinic end generated code: output=e75c48a15def18b9 input=a455a89c57ac9d42]*/
{
#define CHECK_INT_ARG(ARG) \
if (ARG < 0) { \
Expand Down
17 changes: 8 additions & 9 deletions Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ set_union_impl(PySetObject *so, PyObject * const *others,
PyObject *other;
Py_ssize_t i;

result = (PySetObject *)set_copy(so, NULL);
result = (PySetObject *)set_copy((PyObject *)so, NULL);
if (result == NULL)
return NULL;

Expand All @@ -1321,13 +1321,12 @@ set_or(PyObject *self, PyObject *other)

if (!PyAnySet_Check(self) || !PyAnySet_Check(other))
Py_RETURN_NOTIMPLEMENTED;
PySetObject *so = _PySet_CAST(self);

result = (PySetObject *)set_copy(so, NULL);
result = (PySetObject *)set_copy(self, NULL);
if (result == NULL) {
return NULL;
}
if (Py_Is((PyObject *)so, other)) {
if (Py_Is(self, other)) {
return (PyObject *)result;
}
if (set_update_local(result, other)) {
Expand Down Expand Up @@ -1449,7 +1448,7 @@ set_intersection_multi_impl(PySetObject *so, PyObject * const *others,
Py_ssize_t i;

if (others_length == 0) {
return set_copy(so, NULL);
return set_copy((PyObject *)so, NULL);
}

PyObject *result = Py_NewRef(so);
Expand Down Expand Up @@ -1806,7 +1805,7 @@ set_difference_multi_impl(PySetObject *so, PyObject * const *others,
PyObject *result, *other;

if (others_length == 0) {
return set_copy(so, NULL);
return set_copy((PyObject *)so, NULL);
}

other = others[0];
Expand Down Expand Up @@ -1929,7 +1928,7 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
/*[clinic end generated code: output=fbb049c0806028de input=a50acf0365e1f0a5]*/
{
if (Py_Is((PyObject *)so, other)) {
return set_clear(so, NULL);
return set_clear((PyObject *)so, NULL);
}

int rv;
Expand Down Expand Up @@ -2646,7 +2645,7 @@ PySet_Clear(PyObject *set)
PyErr_BadInternalCall();
return -1;
}
(void)set_clear((PySetObject *)set, NULL);
(void)set_clear(set, NULL);
return 0;
}

Expand Down Expand Up @@ -2742,7 +2741,7 @@ PySet_Pop(PyObject *set)
PyErr_BadInternalCall();
return NULL;
}
return set_pop((PySetObject *)set, NULL);
return set_pop(set, NULL);
}

int
Expand Down

0 comments on commit dada02d

Please sign in to comment.