Skip to content

Make merge #1655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2021
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
68 changes: 43 additions & 25 deletions c-api/gcsupport.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-05-29 16:33+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
Expand Down Expand Up @@ -60,26 +60,44 @@ msgid ""
"initialized, it must call :c:func:`PyObject_GC_Track`."
msgstr ""

#: c-api/gcsupport.rst:39
#: c-api/gcsupport.rst:37
msgid ""
"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :"
"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its "
"subclass or subclasses."
msgstr ""

#: c-api/gcsupport.rst:41
msgid ""
"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call "
"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the "
"interpreter will automatically populate the :c:member:`~PyTypeObject."
"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:"
"`~PyTypeObject.tp_clear` fields if the type inherits from a class that "
"implements the garbage collector protocol and the child class does *not* "
"include the :const:`Py_TPFLAGS_HAVE_GC` flag."
msgstr ""

#: c-api/gcsupport.rst:51
msgid ""
"Analogous to :c:func:`PyObject_New` but for container objects with the :"
"const:`Py_TPFLAGS_HAVE_GC` flag set."
msgstr ""

#: c-api/gcsupport.rst:45
#: c-api/gcsupport.rst:57
msgid ""
"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
"const:`Py_TPFLAGS_HAVE_GC` flag set."
msgstr ""

#: c-api/gcsupport.rst:51
#: c-api/gcsupport.rst:63
msgid ""
"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
"resized object or ``NULL`` on failure. *op* must not be tracked by the "
"collector yet."
msgstr ""

#: c-api/gcsupport.rst:57
#: c-api/gcsupport.rst:69
msgid ""
"Adds the object *op* to the set of container objects tracked by the "
"collector. The collector can run at unexpected times so objects must be "
Expand All @@ -88,62 +106,62 @@ msgid ""
"usually near the end of the constructor."
msgstr ""

#: c-api/gcsupport.rst:66
#: c-api/gcsupport.rst:78
msgid ""
"Returns non-zero if the object implements the garbage collector protocol, "
"otherwise returns 0."
msgstr ""

#: c-api/gcsupport.rst:69
#: c-api/gcsupport.rst:81
msgid ""
"The object cannot be tracked by the garbage collector if this function "
"returns 0."
msgstr ""

#: c-api/gcsupport.rst:74
#: c-api/gcsupport.rst:86
msgid ""
"Returns 1 if the object type of *op* implements the GC protocol and *op* is "
"being currently tracked by the garbage collector and 0 otherwise."
msgstr ""

#: c-api/gcsupport.rst:77
#: c-api/gcsupport.rst:89
msgid "This is analogous to the Python function :func:`gc.is_tracked`."
msgstr ""

#: c-api/gcsupport.rst:84
#: c-api/gcsupport.rst:96
msgid ""
"Returns 1 if the object type of *op* implements the GC protocol and *op* has "
"been already finalized by the garbage collector and 0 otherwise."
msgstr ""

#: c-api/gcsupport.rst:87
#: c-api/gcsupport.rst:99
msgid "This is analogous to the Python function :func:`gc.is_finalized`."
msgstr ""

#: c-api/gcsupport.rst:91
#: c-api/gcsupport.rst:103
msgid ""
"Similarly, the deallocator for the object must conform to a similar pair of "
"rules:"
msgstr ""

#: c-api/gcsupport.rst:94
#: c-api/gcsupport.rst:106
msgid ""
"Before fields which refer to other containers are invalidated, :c:func:"
"`PyObject_GC_UnTrack` must be called."
msgstr ""

#: c-api/gcsupport.rst:97
#: c-api/gcsupport.rst:109
msgid ""
"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
msgstr ""

#: c-api/gcsupport.rst:102
#: c-api/gcsupport.rst:114
msgid ""
"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
"func:`PyObject_GC_NewVar`."
msgstr ""

#: c-api/gcsupport.rst:108
#: c-api/gcsupport.rst:120
msgid ""
"Remove the object *op* from the set of container objects tracked by the "
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
Expand All @@ -153,19 +171,19 @@ msgid ""
"handler become invalid."
msgstr ""

#: c-api/gcsupport.rst:117
#: c-api/gcsupport.rst:129
msgid ""
"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros "
"have been removed from the public C API."
msgstr ""

#: c-api/gcsupport.rst:120
#: c-api/gcsupport.rst:132
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
"parameter of this type:"
msgstr ""

#: c-api/gcsupport.rst:125
#: c-api/gcsupport.rst:137
msgid ""
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
"tp_traverse` handler. The function should be called with an object to "
Expand All @@ -175,13 +193,13 @@ msgid ""
"users will need to write their own visitor functions."
msgstr ""

#: c-api/gcsupport.rst:132
#: c-api/gcsupport.rst:144
msgid ""
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
"type:"
msgstr ""

#: c-api/gcsupport.rst:137
#: c-api/gcsupport.rst:149
msgid ""
"Traversal function for a container object. Implementations must call the "
"*visit* function for each object directly contained by *self*, with the "
Expand All @@ -191,28 +209,28 @@ msgid ""
"returned immediately."
msgstr ""

#: c-api/gcsupport.rst:144
#: c-api/gcsupport.rst:156
msgid ""
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
"exactly *visit* and *arg*:"
msgstr ""

#: c-api/gcsupport.rst:151
#: c-api/gcsupport.rst:163
msgid ""
"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
msgstr ""

#: c-api/gcsupport.rst:164
#: c-api/gcsupport.rst:176
msgid ""
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
"`inquiry` type, or ``NULL`` if the object is immutable."
msgstr ""

#: c-api/gcsupport.rst:170
#: c-api/gcsupport.rst:182
msgid ""
"Drop references that may have created reference cycles. Immutable objects "
"do not have to define this method since they can never directly create "
Expand Down
Loading