55msgstr ""
66"Project-Id-Version : Python 3\n "
77"Report-Msgid-Bugs-To : \n "
8- "POT-Creation-Date : 2020-08-24 09:01 +0200\n "
8+ "POT-Creation-Date : 2021-05-29 16:33 +0200\n "
99"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1010"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1111"Language-Team : FRENCH <traductions@lists.afpy.org>\n "
@@ -60,26 +60,44 @@ msgid ""
6060"initialized, it must call :c:func:`PyObject_GC_Track`."
6161msgstr ""
6262
63- #: c-api/gcsupport.rst:39
63+ #: c-api/gcsupport.rst:37
64+ msgid ""
65+ "If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :"
66+ "c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its "
67+ "subclass or subclasses."
68+ msgstr ""
69+
70+ #: c-api/gcsupport.rst:41
71+ msgid ""
72+ "When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call "
73+ "it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the "
74+ "interpreter will automatically populate the :c:member:`~PyTypeObject."
75+ "tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:"
76+ "`~PyTypeObject.tp_clear` fields if the type inherits from a class that "
77+ "implements the garbage collector protocol and the child class does *not* "
78+ "include the :const:`Py_TPFLAGS_HAVE_GC` flag."
79+ msgstr ""
80+
81+ #: c-api/gcsupport.rst:51
6482msgid ""
6583"Analogous to :c:func:`PyObject_New` but for container objects with the :"
6684"const:`Py_TPFLAGS_HAVE_GC` flag set."
6785msgstr ""
6886
69- #: c-api/gcsupport.rst:45
87+ #: c-api/gcsupport.rst:57
7088msgid ""
7189"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
7290"const:`Py_TPFLAGS_HAVE_GC` flag set."
7391msgstr ""
7492
75- #: c-api/gcsupport.rst:51
93+ #: c-api/gcsupport.rst:63
7694msgid ""
7795"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
7896"resized object or ``NULL`` on failure. *op* must not be tracked by the "
7997"collector yet."
8098msgstr ""
8199
82- #: c-api/gcsupport.rst:57
100+ #: c-api/gcsupport.rst:69
83101msgid ""
84102"Adds the object *op* to the set of container objects tracked by the "
85103"collector. The collector can run at unexpected times so objects must be "
@@ -88,62 +106,62 @@ msgid ""
88106"usually near the end of the constructor."
89107msgstr ""
90108
91- #: c-api/gcsupport.rst:66
109+ #: c-api/gcsupport.rst:78
92110msgid ""
93111"Returns non-zero if the object implements the garbage collector protocol, "
94112"otherwise returns 0."
95113msgstr ""
96114
97- #: c-api/gcsupport.rst:69
115+ #: c-api/gcsupport.rst:81
98116msgid ""
99117"The object cannot be tracked by the garbage collector if this function "
100118"returns 0."
101119msgstr ""
102120
103- #: c-api/gcsupport.rst:74
121+ #: c-api/gcsupport.rst:86
104122msgid ""
105123"Returns 1 if the object type of *op* implements the GC protocol and *op* is "
106124"being currently tracked by the garbage collector and 0 otherwise."
107125msgstr ""
108126
109- #: c-api/gcsupport.rst:77
127+ #: c-api/gcsupport.rst:89
110128msgid "This is analogous to the Python function :func:`gc.is_tracked`."
111129msgstr ""
112130
113- #: c-api/gcsupport.rst:84
131+ #: c-api/gcsupport.rst:96
114132msgid ""
115133"Returns 1 if the object type of *op* implements the GC protocol and *op* has "
116134"been already finalized by the garbage collector and 0 otherwise."
117135msgstr ""
118136
119- #: c-api/gcsupport.rst:87
137+ #: c-api/gcsupport.rst:99
120138msgid "This is analogous to the Python function :func:`gc.is_finalized`."
121139msgstr ""
122140
123- #: c-api/gcsupport.rst:91
141+ #: c-api/gcsupport.rst:103
124142msgid ""
125143"Similarly, the deallocator for the object must conform to a similar pair of "
126144"rules:"
127145msgstr ""
128146
129- #: c-api/gcsupport.rst:94
147+ #: c-api/gcsupport.rst:106
130148msgid ""
131149"Before fields which refer to other containers are invalidated, :c:func:"
132150"`PyObject_GC_UnTrack` must be called."
133151msgstr ""
134152
135- #: c-api/gcsupport.rst:97
153+ #: c-api/gcsupport.rst:109
136154msgid ""
137155"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
138156msgstr ""
139157
140- #: c-api/gcsupport.rst:102
158+ #: c-api/gcsupport.rst:114
141159msgid ""
142160"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
143161"func:`PyObject_GC_NewVar`."
144162msgstr ""
145163
146- #: c-api/gcsupport.rst:108
164+ #: c-api/gcsupport.rst:120
147165msgid ""
148166"Remove the object *op* from the set of container objects tracked by the "
149167"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
@@ -153,19 +171,19 @@ msgid ""
153171"handler become invalid."
154172msgstr ""
155173
156- #: c-api/gcsupport.rst:117
174+ #: c-api/gcsupport.rst:129
157175msgid ""
158176"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros "
159177"have been removed from the public C API."
160178msgstr ""
161179
162- #: c-api/gcsupport.rst:120
180+ #: c-api/gcsupport.rst:132
163181msgid ""
164182"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
165183"parameter of this type:"
166184msgstr ""
167185
168- #: c-api/gcsupport.rst:125
186+ #: c-api/gcsupport.rst:137
169187msgid ""
170188"Type of the visitor function passed to the :c:member:`~PyTypeObject."
171189"tp_traverse` handler. The function should be called with an object to "
@@ -175,13 +193,13 @@ msgid ""
175193"users will need to write their own visitor functions."
176194msgstr ""
177195
178- #: c-api/gcsupport.rst:132
196+ #: c-api/gcsupport.rst:144
179197msgid ""
180198"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
181199"type:"
182200msgstr ""
183201
184- #: c-api/gcsupport.rst:137
202+ #: c-api/gcsupport.rst:149
185203msgid ""
186204"Traversal function for a container object. Implementations must call the "
187205"*visit* function for each object directly contained by *self*, with the "
@@ -191,28 +209,28 @@ msgid ""
191209"returned immediately."
192210msgstr ""
193211
194- #: c-api/gcsupport.rst:144
212+ #: c-api/gcsupport.rst:156
195213msgid ""
196214"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
197215"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
198216"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
199217"exactly *visit* and *arg*:"
200218msgstr ""
201219
202- #: c-api/gcsupport.rst:151
220+ #: c-api/gcsupport.rst:163
203221msgid ""
204222"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
205223"*arg*. If *visit* returns a non-zero value, then return it. Using this "
206224"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
207225msgstr ""
208226
209- #: c-api/gcsupport.rst:164
227+ #: c-api/gcsupport.rst:176
210228msgid ""
211229"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
212230"`inquiry` type, or ``NULL`` if the object is immutable."
213231msgstr ""
214232
215- #: c-api/gcsupport.rst:170
233+ #: c-api/gcsupport.rst:182
216234msgid ""
217235"Drop references that may have created reference cycles. Immutable objects "
218236"do not have to define this method since they can never directly create "
0 commit comments