Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
bpo-39573: Apply code review
  • Loading branch information
corona10 committed Feb 13, 2020
commit 600871672b9cc3428e8d482903f97fae5541fa9e
9 changes: 3 additions & 6 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ the definition of all other Python objects.
(((PyObject*)(o))->ob_type)


.. c:macro:: Py_IS_TYPE(o, type)

This macro is used to check whether the type of object *o* is the *type*.
It expands to::

(Py_TYPE(o) == type)
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)

Return true if the type of object *o* is the *type*.
Comment thread
corona10 marked this conversation as resolved.
Outdated
Equivalent to: Py_TYPE(o) == type.
Comment thread
corona10 marked this conversation as resolved.
Outdated

.. versionadded:: 3.9

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.

Ooops, I noticed a typo in one of my previous commit. Would you mind to take this PR as an opportunity to fix it?

https://docs.python.org/dev/c-api/structures.html#c.Py_SET_SIZE

"Set the object o size of size." => "Set ... to size."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh sure :)

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.

Wait, @brandtbucher wrote PR #18496. I will ask him to fix the typo there. You can ignore this special request ;-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Got it ;-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Current

스크린샷 2020-02-13 오후 11 23 37

Suggestion

스크린샷 2020-02-13 오후 11 15 15

Looks like not work as we want ;)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Add :c:macro:`Py_IS_TYPE` macro to check whether the type of object *o* is
the *type*.
Add :c:func:`Py_IS_TYPE` static inline function to check whether
Comment thread
corona10 marked this conversation as resolved.
Outdated
the type of object *o* is the *type*.
Comment thread
corona10 marked this conversation as resolved.
Outdated