7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.12\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2023-07-29 00:03+0000\n "
10
+ "POT-Creation-Date : 2024-02-14 00:03+0000\n "
11
11
"PO-Revision-Date : 2018-05-23 14:31+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -139,12 +139,18 @@ msgstr ""
139
139
140
140
#: ../../c-api/gcsupport.rst:88
141
141
msgid ""
142
- "Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the "
143
- "resized object or ``NULL `` on failure. *op* must not be tracked by the "
144
- "collector yet ."
142
+ "Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the "
143
+ "resized object of type ``TYPE* `` (refers to any C type) or ``NULL`` on "
144
+ "failure ."
145
145
msgstr ""
146
146
147
- #: ../../c-api/gcsupport.rst:94
147
+ #: ../../c-api/gcsupport.rst:92
148
+ msgid ""
149
+ "*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the "
150
+ "collector yet. *newsize* must be of type :c:type:`Py_ssize_t`."
151
+ msgstr ""
152
+
153
+ #: ../../c-api/gcsupport.rst:99
148
154
msgid ""
149
155
"Adds the object *op* to the set of container objects tracked by the "
150
156
"collector. The collector can run at unexpected times so objects must be "
@@ -153,45 +159,45 @@ msgid ""
153
159
"usually near the end of the constructor."
154
160
msgstr ""
155
161
156
- #: ../../c-api/gcsupport.rst:103
162
+ #: ../../c-api/gcsupport.rst:108
157
163
msgid ""
158
164
"Returns non-zero if the object implements the garbage collector protocol, "
159
165
"otherwise returns 0."
160
166
msgstr ""
161
167
162
- #: ../../c-api/gcsupport.rst:106
168
+ #: ../../c-api/gcsupport.rst:111
163
169
msgid ""
164
170
"The object cannot be tracked by the garbage collector if this function "
165
171
"returns 0."
166
172
msgstr ""
167
173
168
- #: ../../c-api/gcsupport.rst:111
174
+ #: ../../c-api/gcsupport.rst:116
169
175
msgid ""
170
176
"Returns 1 if the object type of *op* implements the GC protocol and *op* is "
171
177
"being currently tracked by the garbage collector and 0 otherwise."
172
178
msgstr ""
173
179
174
- #: ../../c-api/gcsupport.rst:114
180
+ #: ../../c-api/gcsupport.rst:119
175
181
msgid "This is analogous to the Python function :func:`gc.is_tracked`."
176
182
msgstr ""
177
183
178
- #: ../../c-api/gcsupport.rst:121
184
+ #: ../../c-api/gcsupport.rst:126
179
185
msgid ""
180
186
"Returns 1 if the object type of *op* implements the GC protocol and *op* has "
181
187
"been already finalized by the garbage collector and 0 otherwise."
182
188
msgstr ""
183
189
184
- #: ../../c-api/gcsupport.rst:124
190
+ #: ../../c-api/gcsupport.rst:129
185
191
msgid "This is analogous to the Python function :func:`gc.is_finalized`."
186
192
msgstr ""
187
193
188
- #: ../../c-api/gcsupport.rst:131
194
+ #: ../../c-api/gcsupport.rst:136
189
195
msgid ""
190
196
"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :"
191
197
"c:macro:`PyObject_GC_NewVar`."
192
198
msgstr ""
193
199
194
- #: ../../c-api/gcsupport.rst:137
200
+ #: ../../c-api/gcsupport.rst:142
195
201
msgid ""
196
202
"Remove the object *op* from the set of container objects tracked by the "
197
203
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
@@ -201,19 +207,19 @@ msgid ""
201
207
"handler become invalid."
202
208
msgstr ""
203
209
204
- #: ../../c-api/gcsupport.rst:146
210
+ #: ../../c-api/gcsupport.rst:151
205
211
msgid ""
206
212
"The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros "
207
213
"have been removed from the public C API."
208
214
msgstr ""
209
215
210
- #: ../../c-api/gcsupport.rst:149
216
+ #: ../../c-api/gcsupport.rst:154
211
217
msgid ""
212
218
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
213
219
"parameter of this type:"
214
220
msgstr ""
215
221
216
- #: ../../c-api/gcsupport.rst:154
222
+ #: ../../c-api/gcsupport.rst:159
217
223
msgid ""
218
224
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
219
225
"tp_traverse` handler. The function should be called with an object to "
@@ -223,13 +229,13 @@ msgid ""
223
229
"users will need to write their own visitor functions."
224
230
msgstr ""
225
231
226
- #: ../../c-api/gcsupport.rst:161
232
+ #: ../../c-api/gcsupport.rst:166
227
233
msgid ""
228
234
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
229
235
"type:"
230
236
msgstr ""
231
237
232
- #: ../../c-api/gcsupport.rst:166
238
+ #: ../../c-api/gcsupport.rst:171
233
239
msgid ""
234
240
"Traversal function for a container object. Implementations must call the "
235
241
"*visit* function for each object directly contained by *self*, with the "
@@ -239,28 +245,28 @@ msgid ""
239
245
"returned immediately."
240
246
msgstr ""
241
247
242
- #: ../../c-api/gcsupport.rst:173
248
+ #: ../../c-api/gcsupport.rst:178
243
249
msgid ""
244
250
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
245
251
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
246
252
"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
247
253
"exactly *visit* and *arg*:"
248
254
msgstr ""
249
255
250
- #: ../../c-api/gcsupport.rst:180
256
+ #: ../../c-api/gcsupport.rst:185
251
257
msgid ""
252
258
"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
253
259
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
254
260
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
255
261
msgstr ""
256
262
257
- #: ../../c-api/gcsupport.rst:193
263
+ #: ../../c-api/gcsupport.rst:198
258
264
msgid ""
259
265
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
260
266
"`inquiry` type, or ``NULL`` if the object is immutable."
261
267
msgstr ""
262
268
263
- #: ../../c-api/gcsupport.rst:199
269
+ #: ../../c-api/gcsupport.rst:204
264
270
msgid ""
265
271
"Drop references that may have created reference cycles. Immutable objects "
266
272
"do not have to define this method since they can never directly create "
@@ -270,78 +276,78 @@ msgid ""
270
276
"in a reference cycle."
271
277
msgstr ""
272
278
273
- #: ../../c-api/gcsupport.rst:208
279
+ #: ../../c-api/gcsupport.rst:213
274
280
msgid "Controlling the Garbage Collector State"
275
281
msgstr ""
276
282
277
- #: ../../c-api/gcsupport.rst:210
283
+ #: ../../c-api/gcsupport.rst:215
278
284
msgid ""
279
285
"The C-API provides the following functions for controlling garbage "
280
286
"collection runs."
281
287
msgstr ""
282
288
283
- #: ../../c-api/gcsupport.rst:215
289
+ #: ../../c-api/gcsupport.rst:220
284
290
msgid ""
285
291
"Perform a full garbage collection, if the garbage collector is enabled. "
286
292
"(Note that :func:`gc.collect` runs it unconditionally.)"
287
293
msgstr ""
288
294
289
- #: ../../c-api/gcsupport.rst:218
295
+ #: ../../c-api/gcsupport.rst:223
290
296
msgid ""
291
297
"Returns the number of collected + unreachable objects which cannot be "
292
298
"collected. If the garbage collector is disabled or already collecting, "
293
299
"returns ``0`` immediately. Errors during garbage collection are passed to :"
294
300
"data:`sys.unraisablehook`. This function does not raise exceptions."
295
301
msgstr ""
296
302
297
- #: ../../c-api/gcsupport.rst:228
303
+ #: ../../c-api/gcsupport.rst:233
298
304
msgid ""
299
305
"Enable the garbage collector: similar to :func:`gc.enable`. Returns the "
300
306
"previous state, 0 for disabled and 1 for enabled."
301
307
msgstr ""
302
308
303
- #: ../../c-api/gcsupport.rst:236
309
+ #: ../../c-api/gcsupport.rst:241
304
310
msgid ""
305
311
"Disable the garbage collector: similar to :func:`gc.disable`. Returns the "
306
312
"previous state, 0 for disabled and 1 for enabled."
307
313
msgstr ""
308
314
309
- #: ../../c-api/gcsupport.rst:244
315
+ #: ../../c-api/gcsupport.rst:249
310
316
msgid ""
311
317
"Query the state of the garbage collector: similar to :func:`gc.isenabled`. "
312
318
"Returns the current state, 0 for disabled and 1 for enabled."
313
319
msgstr ""
314
320
315
- #: ../../c-api/gcsupport.rst:251
321
+ #: ../../c-api/gcsupport.rst:256
316
322
msgid "Querying Garbage Collector State"
317
323
msgstr ""
318
324
319
- #: ../../c-api/gcsupport.rst:253
325
+ #: ../../c-api/gcsupport.rst:258
320
326
msgid ""
321
327
"The C-API provides the following interface for querying information about "
322
328
"the garbage collector."
323
329
msgstr ""
324
330
325
- #: ../../c-api/gcsupport.rst:258
331
+ #: ../../c-api/gcsupport.rst:263
326
332
msgid ""
327
333
"Run supplied *callback* on all live GC-capable objects. *arg* is passed "
328
334
"through to all invocations of *callback*."
329
335
msgstr ""
330
336
331
- #: ../../c-api/gcsupport.rst:262
337
+ #: ../../c-api/gcsupport.rst:267
332
338
msgid ""
333
339
"If new objects are (de)allocated by the callback it is undefined if they "
334
340
"will be visited."
335
341
msgstr ""
336
342
337
- #: ../../c-api/gcsupport.rst:265
343
+ #: ../../c-api/gcsupport.rst:270
338
344
msgid ""
339
345
"Garbage collection is disabled during operation. Explicitly running a "
340
346
"collection in the callback may lead to undefined behaviour e.g. visiting the "
341
347
"same objects multiple times or not at all."
342
348
msgstr ""
343
349
344
- #: ../../c-api/gcsupport.rst:273
350
+ #: ../../c-api/gcsupport.rst:278
345
351
msgid ""
346
352
"Type of the visitor function to be passed to :c:func:"
347
353
"`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to "
0 commit comments