@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.14\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-06-27 14:20 +0000\n "
14
+ "POT-Creation-Date : 2025-07-25 14:21 +0000\n "
15
15
"PO-Revision-Date : 2025-07-18 18:48+0000\n "
16
16
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
17
17
"Language-Team : Japanese (https://app.transifex.com/python-doc/teams/5390/ "
@@ -3293,19 +3293,30 @@ msgid ""
3293
3293
"issue a fatal error."
3294
3294
msgstr ""
3295
3295
3296
- #: ../../c-api/init.rst:2447
3296
+ #: ../../c-api/init.rst:2446
3297
+ msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise."
3298
+ msgstr ""
3299
+
3300
+ #: ../../c-api/init.rst:2450
3301
+ msgid ""
3302
+ "This function is intended for use in assertions and debugging only and "
3303
+ "should not be used to make concurrency control decisions, as the lock state "
3304
+ "may change immediately after the check."
3305
+ msgstr ""
3306
+
3307
+ #: ../../c-api/init.rst:2459
3297
3308
msgid "Python Critical Section API"
3298
3309
msgstr ""
3299
3310
3300
- #: ../../c-api/init.rst:2449
3311
+ #: ../../c-api/init.rst:2461
3301
3312
msgid ""
3302
3313
"The critical section API provides a deadlock avoidance layer on top of per-"
3303
3314
"object locks for :term:`free-threaded <free threading>` CPython. They are "
3304
3315
"intended to replace reliance on the :term:`global interpreter lock`, and are "
3305
3316
"no-ops in versions of Python with the global interpreter lock."
3306
3317
msgstr ""
3307
3318
3308
- #: ../../c-api/init.rst:2454
3319
+ #: ../../c-api/init.rst:2466
3309
3320
msgid ""
3310
3321
"Critical sections avoid deadlocks by implicitly suspending active critical "
3311
3322
"sections and releasing the locks during calls to :c:func:"
@@ -3315,15 +3326,24 @@ msgid ""
3315
3326
"-- they are useful because their behavior is similar to the :term:`GIL`."
3316
3327
msgstr ""
3317
3328
3318
- #: ../../c-api/init.rst:2461
3329
+ #: ../../c-api/init.rst:2473
3330
+ msgid ""
3331
+ "Variants that accept :c:type:`PyMutex` pointers rather than Python objects "
3332
+ "are also available. Use these variants to start a critical section in a "
3333
+ "situation where there is no :c:type:`PyObject` -- for example, when working "
3334
+ "with a C type that does not extend or wrap :c:type:`PyObject` but still "
3335
+ "needs to call into the C API in a manner that might lead to deadlocks."
3336
+ msgstr ""
3337
+
3338
+ #: ../../c-api/init.rst:2479
3319
3339
msgid ""
3320
3340
"The functions and structs used by the macros are exposed for cases where C "
3321
3341
"macros are not available. They should only be used as in the given macro "
3322
3342
"expansions. Note that the sizes and contents of the structures may change in "
3323
3343
"future Python versions."
3324
3344
msgstr ""
3325
3345
3326
- #: ../../c-api/init.rst:2468
3346
+ #: ../../c-api/init.rst:2486
3327
3347
msgid ""
3328
3348
"Operations that need to lock two objects at once must use :c:macro:"
3329
3349
"`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to "
@@ -3332,11 +3352,11 @@ msgid ""
3332
3352
"lock more than two objects at once."
3333
3353
msgstr ""
3334
3354
3335
- #: ../../c-api/init.rst:2474
3355
+ #: ../../c-api/init.rst:2492
3336
3356
msgid "Example usage::"
3337
3357
msgstr "使用例::"
3338
3358
3339
- #: ../../c-api/init.rst:2476
3359
+ #: ../../c-api/init.rst:2494
3340
3360
msgid ""
3341
3361
"static PyObject *\n"
3342
3362
"set_field(MyObject *self, PyObject *value)\n"
@@ -3348,7 +3368,7 @@ msgid ""
3348
3368
"}"
3349
3369
msgstr ""
3350
3370
3351
- #: ../../c-api/init.rst:2485
3371
+ #: ../../c-api/init.rst:2503
3352
3372
msgid ""
3353
3373
"In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which "
3354
3374
"can call arbitrary code through an object's deallocation function. The "
@@ -3358,61 +3378,100 @@ msgid ""
3358
3378
"`PyEval_SaveThread`."
3359
3379
msgstr ""
3360
3380
3361
- #: ../../c-api/init.rst:2493
3381
+ #: ../../c-api/init.rst:2511
3362
3382
msgid ""
3363
3383
"Acquires the per-object lock for the object *op* and begins a critical "
3364
3384
"section."
3365
3385
msgstr ""
3366
3386
3367
- #: ../../c-api/init.rst:2496 ../../c-api/init.rst:2510
3368
- #: ../../c-api/init.rst:2525 ../../c-api/init.rst:2539
3387
+ #: ../../c-api/init.rst:2514 ../../c-api/init.rst:2528
3388
+ #: ../../c-api/init.rst:2545 ../../c-api/init.rst:2560
3389
+ #: ../../c-api/init.rst:2574 ../../c-api/init.rst:2591
3369
3390
msgid "In the free-threaded build, this macro expands to::"
3370
3391
msgstr ""
3371
3392
3372
- #: ../../c-api/init.rst:2498
3393
+ #: ../../c-api/init.rst:2516
3373
3394
msgid ""
3374
3395
"{\n"
3375
3396
" PyCriticalSection _py_cs;\n"
3376
3397
" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))"
3377
3398
msgstr ""
3378
3399
3379
- #: ../../c-api/init.rst:2502 ../../c-api/init.rst:2531
3400
+ #: ../../c-api/init.rst:2520 ../../c-api/init.rst:2566
3380
3401
msgid "In the default build, this macro expands to ``{``."
3381
3402
msgstr ""
3382
3403
3383
- #: ../../c-api/init.rst:2508
3404
+ #: ../../c-api/init.rst:2526
3405
+ msgid "Locks the mutex *m* and begins a critical section."
3406
+ msgstr ""
3407
+
3408
+ #: ../../c-api/init.rst:2530
3409
+ msgid ""
3410
+ "{\n"
3411
+ " PyCriticalSection _py_cs;\n"
3412
+ " PyCriticalSection_BeginMutex(&_py_cs, m)"
3413
+ msgstr ""
3414
+
3415
+ #: ../../c-api/init.rst:2534
3416
+ msgid ""
3417
+ "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for "
3418
+ "the argument of the macro - it must be a :c:type:`PyMutex` pointer."
3419
+ msgstr ""
3420
+
3421
+ #: ../../c-api/init.rst:2537 ../../c-api/init.rst:2583
3422
+ msgid "On the default build, this macro expands to ``{``."
3423
+ msgstr ""
3424
+
3425
+ #: ../../c-api/init.rst:2543
3384
3426
msgid "Ends the critical section and releases the per-object lock."
3385
3427
msgstr ""
3386
3428
3387
- #: ../../c-api/init.rst:2512
3429
+ #: ../../c-api/init.rst:2547
3388
3430
msgid ""
3389
3431
" PyCriticalSection_End(&_py_cs);\n"
3390
3432
"}"
3391
3433
msgstr ""
3392
3434
3393
- #: ../../c-api/init.rst:2515 ../../c-api/init.rst:2544
3435
+ #: ../../c-api/init.rst:2550 ../../c-api/init.rst:2596
3394
3436
msgid "In the default build, this macro expands to ``}``."
3395
3437
msgstr ""
3396
3438
3397
- #: ../../c-api/init.rst:2521
3439
+ #: ../../c-api/init.rst:2556
3398
3440
msgid ""
3399
3441
"Acquires the per-objects locks for the objects *a* and *b* and begins a "
3400
3442
"critical section. The locks are acquired in a consistent order (lowest "
3401
3443
"address first) to avoid lock ordering deadlocks."
3402
3444
msgstr ""
3403
3445
3404
- #: ../../c-api/init.rst:2527
3446
+ #: ../../c-api/init.rst:2562
3405
3447
msgid ""
3406
3448
"{\n"
3407
3449
" PyCriticalSection2 _py_cs2;\n"
3408
3450
" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))"
3409
3451
msgstr ""
3410
3452
3411
- #: ../../c-api/init.rst:2537
3453
+ #: ../../c-api/init.rst:2572
3454
+ msgid "Locks the mutexes *m1* and *m2* and begins a critical section."
3455
+ msgstr ""
3456
+
3457
+ #: ../../c-api/init.rst:2576
3458
+ msgid ""
3459
+ "{\n"
3460
+ " PyCriticalSection2 _py_cs2;\n"
3461
+ " PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)"
3462
+ msgstr ""
3463
+
3464
+ #: ../../c-api/init.rst:2580
3465
+ msgid ""
3466
+ "Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for "
3467
+ "the arguments of the macro - they must be :c:type:`PyMutex` pointers."
3468
+ msgstr ""
3469
+
3470
+ #: ../../c-api/init.rst:2589
3412
3471
msgid "Ends the critical section and releases the per-object locks."
3413
3472
msgstr ""
3414
3473
3415
- #: ../../c-api/init.rst:2541
3474
+ #: ../../c-api/init.rst:2593
3416
3475
msgid ""
3417
3476
" PyCriticalSection2_End(&_py_cs2);\n"
3418
3477
"}"
0 commit comments