5
5
msgstr ""
6
6
"Project-Id-Version : Python 3\n "
7
7
"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 "
9
9
"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
10
10
"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
11
11
"Language-Team : FRENCH <traductions@lists.afpy.org>\n "
@@ -60,26 +60,44 @@ msgid ""
60
60
"initialized, it must call :c:func:`PyObject_GC_Track`."
61
61
msgstr ""
62
62
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
64
82
msgid ""
65
83
"Analogous to :c:func:`PyObject_New` but for container objects with the :"
66
84
"const:`Py_TPFLAGS_HAVE_GC` flag set."
67
85
msgstr ""
68
86
69
- #: c-api/gcsupport.rst:45
87
+ #: c-api/gcsupport.rst:57
70
88
msgid ""
71
89
"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
72
90
"const:`Py_TPFLAGS_HAVE_GC` flag set."
73
91
msgstr ""
74
92
75
- #: c-api/gcsupport.rst:51
93
+ #: c-api/gcsupport.rst:63
76
94
msgid ""
77
95
"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
78
96
"resized object or ``NULL`` on failure. *op* must not be tracked by the "
79
97
"collector yet."
80
98
msgstr ""
81
99
82
- #: c-api/gcsupport.rst:57
100
+ #: c-api/gcsupport.rst:69
83
101
msgid ""
84
102
"Adds the object *op* to the set of container objects tracked by the "
85
103
"collector. The collector can run at unexpected times so objects must be "
@@ -88,62 +106,62 @@ msgid ""
88
106
"usually near the end of the constructor."
89
107
msgstr ""
90
108
91
- #: c-api/gcsupport.rst:66
109
+ #: c-api/gcsupport.rst:78
92
110
msgid ""
93
111
"Returns non-zero if the object implements the garbage collector protocol, "
94
112
"otherwise returns 0."
95
113
msgstr ""
96
114
97
- #: c-api/gcsupport.rst:69
115
+ #: c-api/gcsupport.rst:81
98
116
msgid ""
99
117
"The object cannot be tracked by the garbage collector if this function "
100
118
"returns 0."
101
119
msgstr ""
102
120
103
- #: c-api/gcsupport.rst:74
121
+ #: c-api/gcsupport.rst:86
104
122
msgid ""
105
123
"Returns 1 if the object type of *op* implements the GC protocol and *op* is "
106
124
"being currently tracked by the garbage collector and 0 otherwise."
107
125
msgstr ""
108
126
109
- #: c-api/gcsupport.rst:77
127
+ #: c-api/gcsupport.rst:89
110
128
msgid "This is analogous to the Python function :func:`gc.is_tracked`."
111
129
msgstr ""
112
130
113
- #: c-api/gcsupport.rst:84
131
+ #: c-api/gcsupport.rst:96
114
132
msgid ""
115
133
"Returns 1 if the object type of *op* implements the GC protocol and *op* has "
116
134
"been already finalized by the garbage collector and 0 otherwise."
117
135
msgstr ""
118
136
119
- #: c-api/gcsupport.rst:87
137
+ #: c-api/gcsupport.rst:99
120
138
msgid "This is analogous to the Python function :func:`gc.is_finalized`."
121
139
msgstr ""
122
140
123
- #: c-api/gcsupport.rst:91
141
+ #: c-api/gcsupport.rst:103
124
142
msgid ""
125
143
"Similarly, the deallocator for the object must conform to a similar pair of "
126
144
"rules:"
127
145
msgstr ""
128
146
129
- #: c-api/gcsupport.rst:94
147
+ #: c-api/gcsupport.rst:106
130
148
msgid ""
131
149
"Before fields which refer to other containers are invalidated, :c:func:"
132
150
"`PyObject_GC_UnTrack` must be called."
133
151
msgstr ""
134
152
135
- #: c-api/gcsupport.rst:97
153
+ #: c-api/gcsupport.rst:109
136
154
msgid ""
137
155
"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
138
156
msgstr ""
139
157
140
- #: c-api/gcsupport.rst:102
158
+ #: c-api/gcsupport.rst:114
141
159
msgid ""
142
160
"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
143
161
"func:`PyObject_GC_NewVar`."
144
162
msgstr ""
145
163
146
- #: c-api/gcsupport.rst:108
164
+ #: c-api/gcsupport.rst:120
147
165
msgid ""
148
166
"Remove the object *op* from the set of container objects tracked by the "
149
167
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
@@ -153,19 +171,19 @@ msgid ""
153
171
"handler become invalid."
154
172
msgstr ""
155
173
156
- #: c-api/gcsupport.rst:117
174
+ #: c-api/gcsupport.rst:129
157
175
msgid ""
158
176
"The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros "
159
177
"have been removed from the public C API."
160
178
msgstr ""
161
179
162
- #: c-api/gcsupport.rst:120
180
+ #: c-api/gcsupport.rst:132
163
181
msgid ""
164
182
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
165
183
"parameter of this type:"
166
184
msgstr ""
167
185
168
- #: c-api/gcsupport.rst:125
186
+ #: c-api/gcsupport.rst:137
169
187
msgid ""
170
188
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
171
189
"tp_traverse` handler. The function should be called with an object to "
@@ -175,13 +193,13 @@ msgid ""
175
193
"users will need to write their own visitor functions."
176
194
msgstr ""
177
195
178
- #: c-api/gcsupport.rst:132
196
+ #: c-api/gcsupport.rst:144
179
197
msgid ""
180
198
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
181
199
"type:"
182
200
msgstr ""
183
201
184
- #: c-api/gcsupport.rst:137
202
+ #: c-api/gcsupport.rst:149
185
203
msgid ""
186
204
"Traversal function for a container object. Implementations must call the "
187
205
"*visit* function for each object directly contained by *self*, with the "
@@ -191,28 +209,28 @@ msgid ""
191
209
"returned immediately."
192
210
msgstr ""
193
211
194
- #: c-api/gcsupport.rst:144
212
+ #: c-api/gcsupport.rst:156
195
213
msgid ""
196
214
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
197
215
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
198
216
"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
199
217
"exactly *visit* and *arg*:"
200
218
msgstr ""
201
219
202
- #: c-api/gcsupport.rst:151
220
+ #: c-api/gcsupport.rst:163
203
221
msgid ""
204
222
"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
205
223
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
206
224
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
207
225
msgstr ""
208
226
209
- #: c-api/gcsupport.rst:164
227
+ #: c-api/gcsupport.rst:176
210
228
msgid ""
211
229
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
212
230
"`inquiry` type, or ``NULL`` if the object is immutable."
213
231
msgstr ""
214
232
215
- #: c-api/gcsupport.rst:170
233
+ #: c-api/gcsupport.rst:182
216
234
msgid ""
217
235
"Drop references that may have created reference cycles. Immutable objects "
218
236
"do not have to define this method since they can never directly create "
0 commit comments