-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuffer.po
931 lines (828 loc) · 43.3 KB
/
buffer.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# tomo, 2020
# 秘湯 <[email protected]>, 2020
# Osamu NAKAMURA, 2021
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
"PO-Revision-Date: 2020-05-30 11:47+0000\n"
"Last-Translator: Osamu NAKAMURA, 2021\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../c-api/buffer.rst:11
msgid "Buffer Protocol"
msgstr "バッファプロトコル (buffer Protocol)"
#: ../../c-api/buffer.rst:18
msgid ""
"Certain objects available in Python wrap access to an underlying memory "
"array or *buffer*. Such objects include the built-in :class:`bytes` and :"
"class:`bytearray`, and some extension types like :class:`array.array`. Third-"
"party libraries may define their own types for special purposes, such as "
"image processing or numeric analysis."
msgstr ""
"Pythonで利用可能ないくつかのオブジェクトは、下層にあるメモリ配列または "
"*buffer* へのアクセスを提供します。このようなオブジェクトとして、組み込みの :"
"class:`bytes` や :class:`bytearray` 、 :class:`array.array` のようないくつか"
"の拡張型が挙げられます。サードバーティのライブラリは画像処理や数値解析のよう"
"な特別な目的のために、それら自身の型を定義することができます。"
#: ../../c-api/buffer.rst:24
msgid ""
"While each of these types have their own semantics, they share the common "
"characteristic of being backed by a possibly large memory buffer. It is "
"then desirable, in some situations, to access that buffer directly and "
"without intermediate copying."
msgstr ""
"それぞれの型はそれ自身のセマンティクスを持ちますが、おそらく大きなメモリバッ"
"ファからなるという共通の特徴を共有します。いくつかの状況では仲介するコピーを"
"行うことなく直接バッファにアクセスすることが望まれます。"
#: ../../c-api/buffer.rst:29
msgid ""
"Python provides such a facility at the C level in the form of the :ref:"
"`buffer protocol <bufferobjects>`. This protocol has two sides:"
msgstr ""
"Pythonは :ref:`buffer protocol <bufferobjects>` の形式で C レベルの仕組みを提"
"供します。このプロトコルには二つの側面があります:"
#: ../../c-api/buffer.rst:34
msgid ""
"on the producer side, a type can export a \"buffer interface\" which allows "
"objects of that type to expose information about their underlying buffer. "
"This interface is described in the section :ref:`buffer-structs`;"
msgstr ""
"提供する側では、ある型は、そのオブジェクトの下層にあるバッファに関する情報を"
"提供できる \"buffer インタフェース\" をエクスポートすることができます。このイ"
"ンタフェースは :ref:`buffer-structs` の節で説明します。"
#: ../../c-api/buffer.rst:38
msgid ""
"on the consumer side, several means are available to obtain a pointer to the "
"raw underlying data of an object (for example a method parameter)."
msgstr ""
"利用する側では、オブジェクトの下層にある生データへのポインタを得るいくつかの"
"手段が利用できます(たとえばメソッド引数)。"
#: ../../c-api/buffer.rst:41
msgid ""
"Simple objects such as :class:`bytes` and :class:`bytearray` expose their "
"underlying buffer in byte-oriented form. Other forms are possible; for "
"example, the elements exposed by an :class:`array.array` can be multi-byte "
"values."
msgstr ""
":class:`bytes` や :class:`bytearray` などのシンプルなオブジェクトは、内部の"
"バッファーをバイト列の形式で公開します。\n"
"バイト列以外の形式も利用可能です。例えば、 :class:`array.array` が公開する要"
"素はマルチバイト値になることがあります。"
#: ../../c-api/buffer.rst:45
msgid ""
"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase."
"write` method of file objects: any object that can export a series of bytes "
"through the buffer interface can be written to a file. While :meth:`write` "
"only needs read-only access to the internal contents of the object passed to "
"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write "
"access to the contents of their argument. The buffer interface allows "
"objects to selectively allow or reject exporting of read-write and read-only "
"buffers."
msgstr ""
"bufferインタフェースの利用者の一例は、ファイルオブジェクトの :meth:`~io."
"BufferedIOBase.write` メソッドです: bufferインタフェースを通して一連のバイト"
"列を提供できるどんなオブジェクトでもファイルに書き込むことができます。 :"
"meth:`write` は、その引数として渡されたオブジェクトの内部要素に対する読み出し"
"専用アクセスのみを必要としますが、 :meth:`~io.BufferedIOBase.readinto` のよう"
"な他のメソッドでは、その引数の内容に対する書き込みアクセスが必要です。buffer"
"インタフェースにより、オブジェクトは読み書き両方、読み出し専用バッファへのア"
"クセスを許可するかそれとも拒否するか選択することができます。"
#: ../../c-api/buffer.rst:53
msgid ""
"There are two ways for a consumer of the buffer interface to acquire a "
"buffer over a target object:"
msgstr ""
"bufferインタフェースの利用者には、対象となるオブジェクトのバッファを得る二つ"
"の方法があります:"
#: ../../c-api/buffer.rst:56
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
msgstr "正しい引数で :c:func:`PyObject_GetBuffer` を呼び出す;"
#: ../../c-api/buffer.rst:58
msgid ""
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
"``y*``, ``w*`` or ``s*`` :ref:`format codes <arg-parsing>`."
msgstr ""
":c:func:`PyArg_ParseTuple` (またはその同族のひとつ) を ``y*`` 、 ``w*`` また"
"は ``s*`` :ref:`format codes <arg-parsing>` のいずれかとともに呼び出す。"
#: ../../c-api/buffer.rst:61
msgid ""
"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer "
"isn't needed anymore. Failure to do so could lead to various issues such as "
"resource leaks."
msgstr ""
"どちらのケースでも、bufferが必要なくなった時に :c:func:`PyBuffer_Release` を"
"呼び出さなければなりません。これを怠ると、リソースリークのような様々な問題に"
"つながる恐れがあります。"
#: ../../c-api/buffer.rst:69
msgid "Buffer structure"
msgstr "buffer 構造体"
#: ../../c-api/buffer.rst:71
msgid ""
"Buffer structures (or simply \"buffers\") are useful as a way to expose the "
"binary data from another object to the Python programmer. They can also be "
"used as a zero-copy slicing mechanism. Using their ability to reference a "
"block of memory, it is possible to expose any data to the Python programmer "
"quite easily. The memory could be a large, constant array in a C extension, "
"it could be a raw block of memory for manipulation before passing to an "
"operating system library, or it could be used to pass around structured data "
"in its native, in-memory format."
msgstr ""
"バッファ構造体(または単純に \"buffers\")は別のオブジェクトのバイナリデータ"
"をPythonプログラマに提供するのに便利です。これはまた、ゼロコピースライシング"
"機構としても使用できます。このメモリブロックを参照する機能を使うことで、どん"
"なデータでもとても簡単にPythonプログラマに提供することができます。メモリは、"
"C 拡張の大きな配列定数かもしれませんし、オペレーティングシステムライブラリに"
"渡す前のメモリブロックかもしれませんし、構造化データをネイティブのインメモリ"
"形式受け渡すのに使用されるかもしれません。"
#: ../../c-api/buffer.rst:80
msgid ""
"Contrary to most data types exposed by the Python interpreter, buffers are "
"not :c:type:`PyObject` pointers but rather simple C structures. This allows "
"them to be created and copied very simply. When a generic wrapper around a "
"buffer is needed, a :ref:`memoryview <memoryview-objects>` object can be "
"created."
msgstr ""
"Pythonインタプリタによって提供される多くのデータ型とは異なり、バッファは :c:"
"type:`PyObject` ポインタではなく、シンプルなC 構造体です。そのため、作成とコ"
"ピーが非常に簡単に行えます。バッファの一般的なラッパーが必要なときは、 :ref:"
"`memoryview <memoryview-objects>` オブジェクトが作成されます。"
#: ../../c-api/buffer.rst:86
msgid ""
"For short instructions how to write an exporting object, see :ref:`Buffer "
"Object Structures <buffer-structs>`. For obtaining a buffer, see :c:func:"
"`PyObject_GetBuffer`."
msgstr ""
"エクスポートされるオブジェクトを書く方法の短い説明には、 :ref:`Buffer Object "
"Structures <buffer-structs>` を参照してください。バッファを取得するには、 :c:"
"func:`PyObject_GetBuffer` を参照してください。"
#: ../../c-api/buffer.rst:94
msgid ""
"A pointer to the start of the logical structure described by the buffer "
"fields. This can be any location within the underlying physical memory block "
"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` "
"the value may point to the end of the memory block."
msgstr ""
"バッファフィールドが表している論理構造の先頭を指すポインタ。\n"
"バッファを提供するオブジェクトの下層物理メモリブロック中のどの位置にもなりえ"
"ます。\n"
"例えば :c:member:`~Py_buffer.strides` が負だと、この値はメモリブロックの末尾"
"かもしれません。"
#: ../../c-api/buffer.rst:99
msgid ""
"For :term:`contiguous` arrays, the value points to the beginning of the "
"memory block."
msgstr ""
":term:`連続 <contiguous>` 配列の場合この値はメモリブロックの先頭を指します。"
#: ../../c-api/buffer.rst:104
msgid ""
"A new reference to the exporting object. The reference is owned by the "
"consumer and automatically decremented and set to ``NULL`` by :c:func:"
"`PyBuffer_Release`. The field is the equivalent of the return value of any "
"standard C-API function."
msgstr ""
"エクスポートされているオブジェクトの新しい参照。参照は消費者によって所有さ"
"れ、:c:func:`PyBuffer_Release` によって自動的にデクリメントされて ``NULL`` に"
"設定されます。このフィールドは標準的なC-API 関数の戻り値と等価です。"
#: ../../c-api/buffer.rst:109
msgid ""
"As a special case, for *temporary* buffers that are wrapped by :c:func:"
"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is "
"``NULL``. In general, exporting objects MUST NOT use this scheme."
msgstr ""
":c:func:`PyMemoryView_FromBuffer` または :c:func:`PyBuffer_FillInfo` によって"
"ラップされた *一時的な* バッファである特別なケースでは、このフィールドは "
"``NULL`` です。一般的に、エクスポートオブジェクトはこの方式を使用してはなりま"
"せん。"
#: ../../c-api/buffer.rst:116
msgid ""
"``product(shape) * itemsize``. For contiguous arrays, this is the length of "
"the underlying memory block. For non-contiguous arrays, it is the length "
"that the logical structure would have if it were copied to a contiguous "
"representation."
msgstr ""
"``product(shape) * itemsize``。contiguous配列では、下層のメモリブロックの長さ"
"になります。非contiguous 配列では、contiguous表現にコピーされた場合に論理構造"
"がもつ長さです。"
#: ../../c-api/buffer.rst:121
msgid ""
"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if "
"the buffer has been obtained by a request that guarantees contiguity. In "
"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:"
"`PyBUF_WRITABLE`."
msgstr ""
"``((char *)buf)[0]`` から ``((char *)buf)[len-1]`` の範囲へのアクセスは、連続"
"性 (contiguity) を保証するリクエストによって取得されたバッファに対してのみ許"
"されます。\n"
"多くの場合に、そのようなリクエストは :c:macro:`PyBUF_SIMPLE` または :c:macro:"
"`PyBUF_WRITABLE` です。"
#: ../../c-api/buffer.rst:127
msgid ""
"An indicator of whether the buffer is read-only. This field is controlled by "
"the :c:macro:`PyBUF_WRITABLE` flag."
msgstr ""
"バッファが読み出し専用であるか示します。このフィールドは :c:macro:"
"`PyBUF_WRITABLE` フラグで制御できます。"
#: ../../c-api/buffer.rst:132
msgid ""
"Item size in bytes of a single element. Same as the value of :func:`struct."
"calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values."
msgstr ""
"要素一つ分のbyte単位のサイズ。\n"
":func:`struct.calcsize` を非 ``NULL`` の :c:member:`~Py_buffer.format` 値に対"
"して呼び出した結果と同じです。"
#: ../../c-api/buffer.rst:135
msgid ""
"Important exception: If a consumer requests a buffer without the :c:macro:"
"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to "
"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the "
"original format."
msgstr ""
"重要な例外: 消費者が :c:macro:`PyBUF_FORMAT` フラグを設定することなくバッファ"
"を要求した場合、 :c:member:`~Py_Buffer.format` は ``NULL`` に設定されます。\n"
"しかし :c:member:`~Py_buffer.itemsize` は元のフォーマットに従った値を保持しま"
"す。"
#: ../../c-api/buffer.rst:140
msgid ""
"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * "
"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer."
"itemsize` to navigate the buffer."
msgstr ""
":c:member:`~Py_buffer.shape` が存在する場合、 ``product(shape) * itemsize == "
"len`` の等式が守られ、利用者は :c:member:`~Py_buffer.itemsize` を buffer を読"
"むために利用できます。"
#: ../../c-api/buffer.rst:144
msgid ""
"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:"
"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must "
"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``."
msgstr ""
":c:macro:`PyBUF_SIMPLE` または :c:macro:`PyBUF_WRITABLE` で要求した結果、 :c:"
"member:`~Py_buffer.shape` が ``NULL`` であれば、消費者は :c:member:"
"`~Py_buffer.itemsize` を無視して ``itemsize == 1`` と見なさなければなりませ"
"ん。"
#: ../../c-api/buffer.rst:150
msgid ""
"A *NUL* terminated string in :mod:`struct` module style syntax describing "
"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned "
"bytes) is assumed."
msgstr ""
"要素一つ分の内容を指定する、 :mod:`struct` モジュールスタイル文法の、 *NUL* "
"終端文字列。 このポインタの値が ``NULL`` なら、 ``\"B\"`` (符号無しバイト) と"
"して扱われます。"
#: ../../c-api/buffer.rst:154
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
msgstr "このフィールドは :c:macro:`PyBUF_FORMAT` フラグによって制御されます。"
#: ../../c-api/buffer.rst:158
msgid ""
"The number of dimensions the memory represents as an n-dimensional array. If "
"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing "
"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer."
"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``."
msgstr ""
"メモリがN次元配列を表している時の次元数。\n"
"``0`` の場合、 :c:member:`~Py_buffer.buf` はスカラ値を表す1つの要素を指してい"
"ます。\n"
"この場合、 :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides`, :c:"
"member:`~Py_buffer.suboffsets` は ``NULL`` でなければなりません。"
#: ../../c-api/buffer.rst:163
msgid ""
"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions "
"to 64. Exporters MUST respect this limit, consumers of multi-dimensional "
"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions."
msgstr ""
":c:macro:`PyBUF_MAX_NDIM` は次元数の最大値を64に制限しています。\n"
"提供側はこの制限を尊重しなければなりません。\n"
"多次元配列の消費側は :c:macro:`PyBUF_MAX_NDIM` 次元までを扱えるようにするべき"
"です。"
#: ../../c-api/buffer.rst:169
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"indicating the shape of the memory as an n-dimensional array. Note that "
"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:"
"`~Py_buffer.len`."
msgstr ""
"メモリ上のN次元配列の形を示す、長さが :c:member:`~Py_buffer.ndim` である :c:"
"type:`Py_ssize_t` の配列です。\n"
"``shape[0] * ... * shape[ndim-1] * itemsize`` は :c:member:`~Py_buffer.len` "
"と等しくなければなりません。"
#: ../../c-api/buffer.rst:174
msgid ""
"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` "
"requires special attention. See `complex arrays`_ for further information."
msgstr ""
"shape の値は ``shape[n] >= 0`` に制限されます。 ``shape[n] == 0`` の場合に特"
"に注意が必要です。\n"
"詳細は `complex arrays`_ を参照してください。"
#: ../../c-api/buffer.rst:178
msgid "The shape array is read-only for the consumer."
msgstr "shepe (形状) 配列は利用者からは読み出し専用です。"
#: ../../c-api/buffer.rst:182
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"giving the number of bytes to skip to get to a new element in each dimension."
msgstr ""
"各次元において新しい値を得るためにスキップするバイト数を示す、長さ :c:member:"
"`~Py_buffer.ndim` の :c:type:`Py_ssize_t` の配列。"
#: ../../c-api/buffer.rst:186
msgid ""
"Stride values can be any integer. For regular arrays, strides are usually "
"positive, but a consumer MUST be able to handle the case ``strides[n] <= "
"0``. See `complex arrays`_ for further information."
msgstr ""
"ストライド値は、任意の整数を指定できます。規定の配列では、ストライドは通常で"
"いけば有効です。しかし利用者は、``strides[n] <= 0`` のケースを処理することが"
"できる必要があります。詳細については `complex arrays`_ を参照してください。"
#: ../../c-api/buffer.rst:190
msgid "The strides array is read-only for the consumer."
msgstr "消費者にとって、この strides 配列は読み出し専用です。"
#: ../../c-api/buffer.rst:194
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If "
"``suboffsets[n] >= 0``, the values stored along the nth dimension are "
"pointers and the suboffset value dictates how many bytes to add to each "
"pointer after de-referencing. A suboffset value that is negative indicates "
"that no de-referencing should occur (striding in a contiguous memory block)."
msgstr ""
":c:type:`Py_ssize_t` 型の要素を持つ長さ :c:member:`~Py_buffer.ndim` の配"
"列。\n"
"``suboffsets[n] >= 0`` の場合は、 n 番目の次元に沿って保存されている値はポイ"
"ンタで、 suboffset 値は各ポインタの参照を解決した後に何バイト加えればいいかを"
"示しています。\n"
"suboffset の値が負の数の場合は、ポインタの参照解決は不要 (連続したメモリブ"
"ロック内に直接配置されいる) ということになります。"
#: ../../c-api/buffer.rst:201
msgid ""
"If all suboffsets are negative (i.e. no de-referencing is needed), then this "
"field must be ``NULL`` (the default value)."
msgstr ""
"全ての suboffset が負数の場合 (つまり参照解決が不要) な場合、このフィールド"
"は ``NULL`` (デフォルト値) でなければなりません。"
#: ../../c-api/buffer.rst:204
msgid ""
"This type of array representation is used by the Python Imaging Library "
"(PIL). See `complex arrays`_ for further information how to access elements "
"of such an array."
msgstr ""
"この種の配列表現は Python Imaging Library (PIL) で使われています。\n"
"このような配列で要素にアクセスする方法についてさらに詳しことは `complex "
"arrays`_ を参照してください。"
#: ../../c-api/buffer.rst:208
msgid "The suboffsets array is read-only for the consumer."
msgstr "消費者にとって、suboffsets 配列は読み出し専用です。"
#: ../../c-api/buffer.rst:212
msgid ""
"This is for use internally by the exporting object. For example, this might "
"be re-cast as an integer by the exporter and used to store flags about "
"whether or not the shape, strides, and suboffsets arrays must be freed when "
"the buffer is released. The consumer MUST NOT alter this value."
msgstr ""
"バッファを提供する側のオブジェクトが内部的に利用するための変数です。例えば、"
"提供側はこの変数に整数型をキャストして、shape, strides, suboffsets といった配"
"列をバッファを開放するときに同時に解放するべきかどうかを管理するフラグに使う"
"ことができるでしょう。バッファを受け取る側は、この値を決して変更してはなりま"
"せん。"
#: ../../c-api/buffer.rst:221
msgid "Buffer request types"
msgstr "バッファリクエストのタイプ"
#: ../../c-api/buffer.rst:223
msgid ""
"Buffers are usually obtained by sending a buffer request to an exporting "
"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical "
"structure of the memory can vary drastically, the consumer uses the *flags* "
"argument to specify the exact buffer type it can handle."
msgstr ""
"バッファは通常、 :c:func:`PyObject_GetBuffer` を使うことで、エクスポートする"
"オブジェクトにバッファリクエストを送ることで得られます。メモリの論理的な構造"
"の複雑性は多岐にわたるため、消費者は *flags* 引数を使って、自身が扱えるバッ"
"ファの種類を指定します。"
#: ../../c-api/buffer.rst:228
msgid ""
"All :c:data:`Py_buffer` fields are unambiguously defined by the request type."
msgstr ""
":c:data:`Py_buffer` の全フィールドは、リクエストの種類によって曖昧さを残さず"
"に定義されます。"
#: ../../c-api/buffer.rst:232
msgid "request-independent fields"
msgstr "リクエストに依存しないフィールド"
#: ../../c-api/buffer.rst:233
msgid ""
"The following fields are not influenced by *flags* and must always be filled "
"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:"
"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer."
"itemsize`, :c:member:`~Py_buffer.ndim`."
msgstr ""
"下記のフィールドは *flags* の影響を受けずに、常に正しい値で設定されます。: :"
"c:member:`~Py_buffer.obj`, :c:member:`~Py_buffer.buf`, :c:member:`~Py_buffer."
"len`, :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`."
#: ../../c-api/buffer.rst:239
msgid "readonly, format"
msgstr "readonly, format"
#: ../../c-api/buffer.rst:243
msgid ""
"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter "
"MUST provide a writable buffer or else report failure. Otherwise, the "
"exporter MAY provide either a read-only or writable buffer, but the choice "
"MUST be consistent for all consumers."
msgstr ""
":c:member:`~Py_buffer.readonly` フィールドを制御します。もしこのフラグが設定"
"されている場合、exporter は、書き込み可能なバッファを提供するか、さもなければ"
"失敗を報告しなければなりません。フラグが設定されていない場合、exporterは、読"
"み出し専用と書き込み可能なバッファのどちらを提供しても構いませんが、どちらで"
"提供するかどうかは全ての消費者に対して一貫性がなければなりません。"
#: ../../c-api/buffer.rst:250
msgid ""
"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be "
"filled in correctly. Otherwise, this field MUST be ``NULL``."
msgstr ""
":c:member:`~Py_buffer.format` フィールドを制御します。もしフラグが設定されて"
"いれば、このフィールドを正しく埋めなければなりません。フラグが設定されていな"
"ければ、このフィールドを ``NULL`` に設定しなければなりません。"
#: ../../c-api/buffer.rst:254
msgid ""
":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next "
"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:"
"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple "
"writable buffer."
msgstr ""
":c:macro:`PyBUF_WRITABLE` は、次の節に出てくるどのフラグとも \\| を取ってかま"
"いません。\n"
":c:macro:`PyBUF_SIMPLE` は 0 と定義されているので、 :c:macro:"
"`PyBUF_WRITABLE` は単純な書き込み可能なバッファを要求する単独のフラグとして使"
"えます。"
#: ../../c-api/buffer.rst:258
msgid ""
":c:macro:`PyBUF_FORMAT` can be \\|'d to any of the flags except :c:macro:"
"`PyBUF_SIMPLE`. The latter already implies format ``B`` (unsigned bytes)."
msgstr ""
":c:macro:`PyBUF_FORMAT` は、:c:macro:`PyBUF_SIMPLE` 以外のどのフラグとも \\| "
"を取ってかまいません。\n"
"後者のフラグは ``B`` (符号なしバイト) フォーマットを既に指示しています。"
#: ../../c-api/buffer.rst:263
msgid "shape, strides, suboffsets"
msgstr "shape, strides, suboffsets"
#: ../../c-api/buffer.rst:265
msgid ""
"The flags that control the logical structure of the memory are listed in "
"decreasing order of complexity. Note that each flag contains all bits of the "
"flags below it."
msgstr ""
"このフラグは、以下で複雑性が大きい順に並べたメモリの論理的な構造を制御しま"
"す。個々のフラグは、それより下に記載されたフラグのすべてのビットを含むことに"
"注意してください。"
#: ../../c-api/buffer.rst:272 ../../c-api/buffer.rst:296
#: ../../c-api/buffer.rst:321
msgid "Request"
msgstr "リクエスト"
#: ../../c-api/buffer.rst:272 ../../c-api/buffer.rst:296
#: ../../c-api/buffer.rst:321
msgid "shape"
msgstr "shape"
#: ../../c-api/buffer.rst:272 ../../c-api/buffer.rst:296
#: ../../c-api/buffer.rst:321
msgid "strides"
msgstr "strides"
#: ../../c-api/buffer.rst:272 ../../c-api/buffer.rst:296
#: ../../c-api/buffer.rst:321
msgid "suboffsets"
msgstr "suboffsets"
#: ../../c-api/buffer.rst:274 ../../c-api/buffer.rst:276
#: ../../c-api/buffer.rst:278 ../../c-api/buffer.rst:298
#: ../../c-api/buffer.rst:300 ../../c-api/buffer.rst:302
#: ../../c-api/buffer.rst:304 ../../c-api/buffer.rst:323
#: ../../c-api/buffer.rst:325 ../../c-api/buffer.rst:327
#: ../../c-api/buffer.rst:329 ../../c-api/buffer.rst:331
#: ../../c-api/buffer.rst:333 ../../c-api/buffer.rst:335
#: ../../c-api/buffer.rst:337
msgid "yes"
msgstr "yes"
#: ../../c-api/buffer.rst:274 ../../c-api/buffer.rst:323
#: ../../c-api/buffer.rst:325
msgid "if needed"
msgstr "必要な場合"
#: ../../c-api/buffer.rst:276 ../../c-api/buffer.rst:278
#: ../../c-api/buffer.rst:280 ../../c-api/buffer.rst:298
#: ../../c-api/buffer.rst:300 ../../c-api/buffer.rst:302
#: ../../c-api/buffer.rst:304 ../../c-api/buffer.rst:327
#: ../../c-api/buffer.rst:329 ../../c-api/buffer.rst:331
#: ../../c-api/buffer.rst:333 ../../c-api/buffer.rst:335
#: ../../c-api/buffer.rst:337
msgid "NULL"
msgstr "NULL"
#: ../../c-api/buffer.rst:287
msgid "contiguity requests"
msgstr "隣接性のリクエスト"
#: ../../c-api/buffer.rst:289
msgid ""
"C or Fortran :term:`contiguity <contiguous>` can be explicitly requested, "
"with and without stride information. Without stride information, the buffer "
"must be C-contiguous."
msgstr ""
"ストライドの情報があってもなくても、C または Fortran の :term:`連続性 "
"<contiguous>` が明確に要求される可能性があります。\n"
"ストライド情報なしに、バッファーは C と隣接している必要があります。"
#: ../../c-api/buffer.rst:296 ../../c-api/buffer.rst:321
msgid "contig"
msgstr "contig"
#: ../../c-api/buffer.rst:298 ../../c-api/buffer.rst:304
#: ../../c-api/buffer.rst:335 ../../c-api/buffer.rst:337
msgid "C"
msgstr "C"
#: ../../c-api/buffer.rst:300
msgid "F"
msgstr "F"
#: ../../c-api/buffer.rst:302
msgid "C or F"
msgstr "C か F"
#: ../../c-api/buffer.rst:304
msgid ":c:macro:`PyBUF_ND`"
msgstr ":c:macro:`PyBUF_ND`"
#: ../../c-api/buffer.rst:309
msgid "compound requests"
msgstr "複合リクエスト"
#: ../../c-api/buffer.rst:311
msgid ""
"All possible requests are fully defined by some combination of the flags in "
"the previous section. For convenience, the buffer protocol provides "
"frequently used combinations as single flags."
msgstr ""
"有り得る全てのリクエストの値は、前の節でのフラグの組み合わせで網羅的に定義さ"
"れています。\n"
"便利なように、バッファープロトコルでは頻繁に使用される組み合わせを単一のフラ"
"グとして提供してます。"
#: ../../c-api/buffer.rst:315
msgid ""
"In the following table *U* stands for undefined contiguity. The consumer "
"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity."
msgstr ""
"次のテーブルの *U* は連続性が未定義であることを表します。\n"
"利用者は :c:func:`PyBuffer_IsContiguous` を呼び出して連続性を判定する必要があ"
"るでしょう。"
#: ../../c-api/buffer.rst:321
msgid "readonly"
msgstr "readonly"
#: ../../c-api/buffer.rst:321
msgid "format"
msgstr "format"
#: ../../c-api/buffer.rst:323 ../../c-api/buffer.rst:325
#: ../../c-api/buffer.rst:327 ../../c-api/buffer.rst:329
#: ../../c-api/buffer.rst:331 ../../c-api/buffer.rst:333
msgid "U"
msgstr "U"
#: ../../c-api/buffer.rst:323 ../../c-api/buffer.rst:327
#: ../../c-api/buffer.rst:331 ../../c-api/buffer.rst:335
msgid "0"
msgstr "0"
#: ../../c-api/buffer.rst:325 ../../c-api/buffer.rst:329
#: ../../c-api/buffer.rst:333 ../../c-api/buffer.rst:337
msgid "1 or 0"
msgstr "1 か 0"
#: ../../c-api/buffer.rst:342
msgid "Complex arrays"
msgstr "複雑な配列"
#: ../../c-api/buffer.rst:345
msgid "NumPy-style: shape and strides"
msgstr "NumPy スタイル: shape, strides"
#: ../../c-api/buffer.rst:347
msgid ""
"The logical structure of NumPy-style arrays is defined by :c:member:"
"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer."
"shape` and :c:member:`~Py_buffer.strides`."
msgstr ""
"NumPy スタイルの配列の論理的構造は :c:member:`~Py_buffer.itemsize`, :c:"
"member:`~Py_buffer.ndim`, :c:member:`~Py_buffer.shape`, :c:member:"
"`~Py_buffer.strides` で定義されます。"
#: ../../c-api/buffer.rst:350
msgid ""
"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer."
"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In "
"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer."
"strides` are ``NULL``."
msgstr ""
"``ndim == 0`` の場合は、 :c:member:`~Py_buffer.buf` が指すメモリの場所は、サ"
"イズが :c:member:`~Py_buffer.itemsize` のスカラ値として解釈されます。\n"
"この場合、 :c:member:`~Py_buffer.shape` と :c:member:`~Py_buffer.strides` の"
"両方とも ``NULL`` です。"
#: ../../c-api/buffer.rst:354
msgid ""
"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a "
"standard n-dimensional C-array. Otherwise, the consumer must access an n-"
"dimensional array as follows:"
msgstr ""
":c:member:`~Py_buffer.strides` が ``NULL`` の場合は、配列は標準の n 次元 C 配"
"列として解釈されます。\n"
"そうでない場合は、利用者は次のように n 次元配列にアクセスしなければなりませ"
"ん:"
#: ../../c-api/buffer.rst:364
msgid ""
"As noted above, :c:member:`~Py_buffer.buf` can point to any location within "
"the actual memory block. An exporter can check the validity of a buffer with "
"this function:"
msgstr ""
"上記のように、 :c:member:`~Py_buffer.buf` はメモリブロック内のどの場所でも指"
"すことが可能です。エクスポーターはこの関数を使用することによってバッファの妥"
"当性を確認出来ます。"
#: ../../c-api/buffer.rst:398
msgid "PIL-style: shape, strides and suboffsets"
msgstr "PIL スタイル: shape, strides, suboffsets"
#: ../../c-api/buffer.rst:400
msgid ""
"In addition to the regular items, PIL-style arrays can contain pointers that "
"must be followed in order to get to the next element in a dimension. For "
"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also "
"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char "
"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be "
"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char "
"x[2][3]`` arrays that can be located anywhere in memory."
msgstr ""
"PIL スタイルの配列では通常の要素の他に、ある次元の上で次の要素を取得するため"
"に辿るポインタを持てます。\n"
"例えば、通常の3次元 C 配列 ``char v[2][2][3]`` は、2次元配列への 2 つのポイン"
"タからなる配列 ``char (*v[2])[2][3]`` と見ることもできます。\n"
"suboffset 表現では、これらの 2 つのポインタは :c:member:`~Py_buffer.buf` の先"
"頭に埋め込め、メモリのどこにでも配置できる 2 つの ``char x[2][3]`` 配列を指し"
"ます。"
#: ../../c-api/buffer.rst:409
msgid ""
"Here is a function that returns a pointer to the element in an N-D array "
"pointed to by an N-dimensional index when there are both non-``NULL`` "
"strides and suboffsets::"
msgstr ""
"次の例は、 strides も suboffsets も ``NULL`` でない場合の、N 次元インデックス"
"によって指されている N 次元配列内の要素へのポインタを返す関数です::"
#: ../../c-api/buffer.rst:428
msgid "Buffer-related functions"
msgstr "バッファ関連の関数"
#: ../../c-api/buffer.rst:432
msgid ""
"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When "
"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` "
"will succeed. This function always succeeds."
msgstr ""
"*obj* がbuffer インタフェースをサポートしている場合は ``1`` を返し、そうでな"
"い場合は ``0`` を返します。\n"
"``1`` を返したとしても、 :c:func:`PyObject_GetBuffer` が成功することは保証さ"
"れません。\n"
"この関数は常に成功します。"
#: ../../c-api/buffer.rst:439
msgid ""
"Send a request to *exporter* to fill in *view* as specified by *flags*. If "
"the exporter cannot provide a buffer of the exact type, it MUST raise :c:"
"data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
msgstr ""
"*exporter* に *flags* で指定された方法で *view* を埋めるように要求します。\n"
"もし exporter が指定されたとおりにバッファを提供できない場合、 :c:data:"
"`PyExc_BufferError` を送出し、 ``view->obj`` を ``NULL`` に設定した上で、 "
"``-1`` を返さなければなりません。"
#: ../../c-api/buffer.rst:444
msgid ""
"On success, fill in *view*, set ``view->obj`` to a new reference to "
"*exporter* and return 0. In the case of chained buffer providers that "
"redirect requests to a single object, ``view->obj`` MAY refer to this object "
"instead of *exporter* (See :ref:`Buffer Object Structures <buffer-structs>`)."
msgstr ""
"成功したときは、 *view* を埋め、 ``view->obj`` に *exporter* への新しい参照を"
"設定し、0を返します。チェイン状のバッファプロバイダがリクエストを単一のオブ"
"ジェクトにリダイレクトするケースでは、 ``view->obj`` は *exporter* の代わりに"
"このオブジェクトを参照します (:ref:`バッファオブジェクト構造体 <buffer-"
"structs>` を参照してください)。"
#: ../../c-api/buffer.rst:449
msgid ""
"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls "
"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:"
"`free`. Thus, after the consumer is done with the buffer, :c:func:"
"`PyBuffer_Release` must be called exactly once."
msgstr ""
":c:func:`malloc` と :c:func:`free` のように、呼び出しに成功した :c:func:"
"`PyObject_GetBuffer` と対になる :c:func:`PyBuffer_Release` の呼び出しがなけれ"
"なればなりません。\n"
"従って、バッファの利用が済んだら :c:func:`PyBuffer_Release` が厳密に1回だけ呼"
"び出されなければなりません。"
#: ../../c-api/buffer.rst:457
msgid ""
"Release the buffer *view* and decrement the reference count for ``view-"
">obj``. This function MUST be called when the buffer is no longer being "
"used, otherwise reference leaks may occur."
msgstr ""
"バッファ *view* を解放し、 ``view->obj`` の参照カウントを1つ減らします。\n"
"この関数はバッファが使われることがなくなったときに呼び出さなければならず、そ"
"うしないと参照のリークが起こり得ます。"
#: ../../c-api/buffer.rst:461
msgid ""
"It is an error to call this function on a buffer that was not obtained via :"
"c:func:`PyObject_GetBuffer`."
msgstr ""
":c:func:`PyObject_GetBuffer` を通して取得していないバッファに対してこの関数を"
"呼び出すのは間違いです。"
#: ../../c-api/buffer.rst:467
msgid ""
"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer."
"format`. This function is not yet implemented."
msgstr ""
":c:data:`~Py_buffer.itemsize` の値を :c:data:`~PyBuffer.format` から計算して"
"返します。\n"
"この関数はまだ実装されていません。"
#: ../../c-api/buffer.rst:473
msgid ""
"Return ``1`` if the memory defined by the *view* is C-style (*order* is "
"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either "
"one (*order* is ``'A'``). Return ``0`` otherwise. This function always "
"succeeds."
msgstr ""
"*view* で定義されているメモリが、 C スタイル (*order* == ``'C'``) のときか、 "
"Fortran スタイル (*order* == ``'F'``) :term:`連続 <contiguous>` のときか、そ"
"のいずれか (*order* == ``'A'``) であれば ``1`` を返します。\n"
"それ以外の場合は ``0`` を返します。\n"
"この関数は常に成功します。"
#: ../../c-api/buffer.rst:480
msgid ""
"Get the memory area pointed to by the *indices* inside the given *view*. "
"*indices* must point to an array of ``view->ndim`` indices."
msgstr ""
"与えられた *view* 内にある *indices* が指すメモリ領域を取得します。\n"
"*indices* は ``view->ndim`` 個のインデックスからなる配列を指していなければな"
"りません。"
#: ../../c-api/buffer.rst:486
msgid ""
"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or "
"``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on "
"success, ``-1`` on error."
msgstr ""
"連続する *len* バイトを *buf* から *view* にコピーします。*fort* には "
"``'C'`` か ``'F'`` を指定できます(それぞれC言語スタイルとFortranスタイルの順"
"序を表します)。成功時には ``0``、エラー時には ``-1`` を返します。"
#: ../../c-api/buffer.rst:493
msgid ""
"Copy *len* bytes from *src* to its contiguous representation in *buf*. "
"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style "
"ordering or either one). ``0`` is returned on success, ``-1`` on error."
msgstr ""
"*src* から *len* バイトを連続表現で *buf* 上にコピーします。\n"
"*order* は ``'C'`` または ``'F'`` または ``'A'`` (C スタイル順序または "
"Fortran スタイル順序またはそれ以外) が指定できます。\n"
"成功したら ``0`` が返り、エラーなら ``-1`` が返ります。"
#: ../../c-api/buffer.rst:497
msgid "This function fails if *len* != *src->len*."
msgstr "*len* != *src->len* の場合、この関数は失敗します。"
#: ../../c-api/buffer.rst:502
msgid ""
"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style "
"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the "
"given shape with the given number of bytes per element."
msgstr ""
"*strides* 配列を、 *itemsize* の大きさの要素がバイト単位の、 *shape* の形をし"
"た :term:`連続な <contiguous>` (*order* が ``'C'`` なら C-style 、 ``'F'`` な"
"ら Fortran-style の) 多次元配列として埋める。"
#: ../../c-api/buffer.rst:509
msgid ""
"Handle buffer requests for an exporter that wants to expose *buf* of size "
"*len* with writability set according to *readonly*. *buf* is interpreted as "
"a sequence of unsigned bytes."
msgstr ""
"サイズが *len* の *buf* を *readonly* に従った書き込み可/不可の設定で公開する"
"バッファリクエストを処理します。\n"
"*buf* は符号無しバイトの列として解釈されます。"
#: ../../c-api/buffer.rst:513
msgid ""
"The *flags* argument indicates the request type. This function always fills "
"in *view* as specified by flags, unless *buf* has been designated as read-"
"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*."
msgstr ""
"*flags* 引数はリクエストのタイプを示します。\n"
"この関数は、 *buf* が読み出し専用と指定されていて、 *flags* に :c:macro:"
"`PyBUF_WRITABLE` が設定されていない限り、常にフラグに指定された通りに *view* "
"を埋めます。"
#: ../../c-api/buffer.rst:517
msgid ""
"On success, set ``view->obj`` to a new reference to *exporter* and return 0. "
"Otherwise, raise :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` "
"and return ``-1``;"
msgstr ""
"成功したときは、 ``view->obj`` に *exporter* への新しい参照を設定し、 0 を返"
"します。\n"
"失敗したときは、 :c:data:`PyExc_BufferError` を送出し、 ``view->obj`` に "
"``NULL`` を設定し、 ``-1`` を返します;"
#: ../../c-api/buffer.rst:521
msgid ""
"If this function is used as part of a :ref:`getbufferproc <buffer-structs>`, "
"*exporter* MUST be set to the exporting object and *flags* must be passed "
"unmodified. Otherwise, *exporter* MUST be ``NULL``."
msgstr ""
"この関数を :ref:`getbufferproc <buffer-structs>` の一部として使う場合には、 "
"*exporter* はエクスポートするオブジェクトに設定しなければならず、さらに "
"*flags* は変更せずに渡さなければなりません。\n"
"そうでない場合は、 *exporter* は ``NULL`` でなければなりません。"