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
2 changes: 1 addition & 1 deletion Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ PyAPI_FUNC(PyObject *) PyObject_GetIter(PyObject *);
((obj)->ob_type->tp_iternext != NULL && \
(obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
#else
PyAPI_FUNC(int) PyIter_Check(PyObject*);
PyAPI_FUNC(int) PyIter_Check(PyObject *);
#endif

/* Takes an iterator object and calls its tp_iternext slot,
Expand Down
4 changes: 2 additions & 2 deletions Include/pyerrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);

#ifndef Py_LIMITED_API
#define PyExceptionClass_Name(x) \
((char *)(((PyTypeObject*)(x))->tp_name))
((char *)(((PyTypeObject *)(x))->tp_name))
#else
PyAPI_FUNC(char *) PyExceptionClass_Name(PyObject*);
PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *);
#endif

#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Seven macro incompatibilities with the Limited API were fixed, and the
macros PyIter_Check, PyIndex_Check and PyExceptionClass_Name were added as
functions. A script for automatic macro checks was added.
functions. The return type of PyExceptionClass_Name is "const char \*".
A script for automatic macro checks was added.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this script? I don't see it in this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added in the other PR. This PR is just post-commit cosmetic fixes.

2 changes: 2 additions & 0 deletions Objects/abstract.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,7 @@ PyNumber_Absolute(PyObject *o)
}

#undef PyIndex_Check

int
PyIndex_Check(PyObject *obj)
{
Expand Down Expand Up @@ -2544,6 +2545,7 @@ PyObject_GetIter(PyObject *o)
}

#undef PyIter_Check

int PyIter_Check(PyObject *obj)
{
return obj->ob_type->tp_iternext != NULL &&
Expand Down
1 change: 1 addition & 0 deletions Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ PyException_SetContext(PyObject *self, PyObject *context)
}

#undef PyExceptionClass_Name

char *
PyExceptionClass_Name(PyObject *ob)
{
Expand Down