-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathbuffer.po
741 lines (657 loc) · 37.7 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# tomo, 2017
# 秘湯 <[email protected]>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Python 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 01:01+0900\n"
"PO-Revision-Date: 2018-12-19 22:58+0000\n"
"Last-Translator: tomo\n"
"Language-Team: Japanese (http://www.transifex.com/python-doc/python-27/"
"language/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:6
msgid "Buffers and Memoryview Objects"
msgstr "buffer オブジェクトと memoryview オブジェクト"
#: ../../c-api/buffer.rst:16
msgid ""
"Python objects implemented in C can export a group of functions called the "
"\"buffer interface.\" These functions can be used by an object to expose "
"its data in a raw, byte-oriented format. Clients of the object can use the "
"buffer interface to access the object data directly, without needing to copy "
"it first."
msgstr ""
"C で実装された Python オブジェクトは、\"バッファインタフェース (buffer "
"interface)\" と呼ばれる一連の関数を公開していることがあります。これらの関数"
"は、あるオブジェクトのデータを生 (raw) のバイト列形式で公開するために使いま"
"す。このオブジェクトの使い手は、バッファインタフェースを使うことで、オブジェ"
"クトをあらかじめコピーしておく必要なしに、オブジェクトのデータに直接アクセス"
"できます。"
#: ../../c-api/buffer.rst:22
msgid ""
"Two examples of objects that support the buffer interface are strings and "
"arrays. The string object exposes the character contents in the buffer "
"interface's byte-oriented form. An array can only expose its contents via "
"the old-style buffer interface. This limitation does not apply to Python 3, "
"where :class:`memoryview` objects can be constructed from arrays, too. Array "
"elements may be multi-byte values."
msgstr ""
"バッファインタフェースをサポートするオブジェクトの例として、文字列型とアレイ "
"(array) 型の二つがあります。文字列オブジェクトは、その内容をバッファインタ"
"フェースのバイト指向の形式で公開しています。アレイはその内容を旧スタイルバッ"
"ファインターフェイス経由でしか公開できません。この制限は :class:`memoryview` "
"オブジェクトをアレイから構築出来る Python 3 には適用されません。アレイの要素"
"は複数バイトの値になりえます。"
#: ../../c-api/buffer.rst:29
msgid ""
"An example user of the buffer interface is the file object's :meth:`write` "
"method. Any object that can export a series of bytes through the buffer "
"interface can be written to a file. There are a number of format codes to :c:"
"func:`PyArg_ParseTuple` that operate against an object's buffer interface, "
"returning data from the target object."
msgstr ""
"バッファインタフェースの使い手の一例として、ファイルオブジェクトの :meth:"
"`write` メソッドがあります。バッファインタフェースを介してバイト列を公開して"
"いるオブジェクトは全て、ファイルへの書き出しができます。オブジェクトのバッ"
"ファインタフェースを操作し、対象となるオブジェクトからデータを返させる :c:"
"func:`PyArg_ParseTuple` には数多くのデータ書式化コードがあります。"
#: ../../c-api/buffer.rst:35
msgid ""
"Starting from version 1.6, Python has been providing Python-level buffer "
"objects and a C-level buffer API so that any built-in or used-defined type "
"can expose its characteristics. Both, however, have been deprecated because "
"of various shortcomings, and have been officially removed in Python 3 in "
"favour of a new C-level buffer API and a new Python-level object named :"
"class:`memoryview`."
msgstr ""
"バージョン 1.6 から、Python は Python レベルのバッファオブジェクトと、 C 言語"
"レベルのバッファ API を提供しており、任意のビルトイン型やユーザー定義型はその"
"文字列表現を公開することができます。しかし、両方共、幾つかの欠点のために廃止"
"予定扱いされていて、 Python 3 では公式に削除され、新しい C 言語レベルのバッ"
"ファ API と新しい Python レベルの :class:`memoryview` という名前のオブジェク"
"トに置き換えられています。"
#: ../../c-api/buffer.rst:42
msgid ""
"The new buffer API has been backported to Python 2.6, and the :class:"
"`memoryview` object has been backported to Python 2.7. It is strongly "
"advised to use them rather than the old APIs, unless you are blocked from "
"doing so for compatibility reasons."
msgstr ""
"新しいバッファ API は Python 2.6 に逆移植されており、 :class:`memoryviews` オ"
"ブジェクトは Python 2.7 に逆移植されています。古いバージョンとの互換性が必要"
"なければ、古いAPIの代わりにこれらを使うことをおすすめします。"
#: ../../c-api/buffer.rst:49
msgid "The new-style Py_buffer struct"
msgstr "新スタイル Py_buffer 構造体"
#: ../../c-api/buffer.rst:56
msgid "A pointer to the start of the memory for the object."
msgstr "オブジェクトのメモリの開始位置へのポインタ"
#: ../../c-api/buffer.rst:61
msgid "The total length of the memory in bytes."
msgstr "メモリのトータルサイズ [byte]"
#: ../../c-api/buffer.rst:65
msgid "An indicator of whether the buffer is read only."
msgstr "バッファが読み込み専用かどうかを示す"
#: ../../c-api/buffer.rst:70
msgid ""
"A *NULL* terminated string in :mod:`struct` module style syntax giving the "
"contents of the elements available through the buffer. If this is *NULL*, "
"``\"B\"`` (unsigned bytes) is assumed."
msgstr ""
"バッファを通してアクセスできる要素の形式を指定する、 :mod:`struct` モジュール"
"スタイル文法の、 *NULL* 終端文字列。このポインタの値が *NULL* なら、 "
"``\"B\"`` (符号無しバイト) として扱われます。"
#: ../../c-api/buffer.rst:76
msgid ""
"The number of dimensions the memory represents as a multi-dimensional "
"array. If it is ``0``, :c:data:`strides` and :c:data:`suboffsets` must be "
"*NULL*."
msgstr ""
"メモリが多次元配列を表している時の次元数。 ``0`` の場合、 :c:data:`strides` "
"と :c:data:`suboffsets` は *NULL* でなければなりません。"
#: ../../c-api/buffer.rst:82
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim` giving the "
"shape of the memory as a multi-dimensional array. Note that ``((*shape)[0] "
"* ... * (*shape)[ndims-1])*itemsize`` should be equal to :c:data:`len`."
msgstr ""
"メモリが多次元配列を表しているとき、その形を示す長さ :c:data:`ndim` の :c:"
"type:`Py_ssize_t` の配列。 ``((*shape)[0] * ... * (*shape)"
"[ndims-1])*itemsize`` は :c:data:`len` と等しくなければならないことに気をつけ"
"てください。"
#: ../../c-api/buffer.rst:89
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim` giving the "
"number of bytes to skip to get to a new element in each dimension."
msgstr ""
"各次元で次の要素を得るためにスキップするバイト数を示す、長さ :c:data:`ndim` "
"の :c:type:`Py_ssize_t` の配列。"
#: ../../c-api/buffer.rst:94
msgid ""
"An array of :c:type:`Py_ssize_t`\\s the length of :c:data:`ndim`. If these "
"suboffset numbers are greater than or equal to 0, then the value stored "
"along the indicated dimension is a pointer and the suboffset value dictates "
"how many bytes to add to the pointer after de-referencing. A suboffset value "
"that it negative indicates that no de-referencing should occur (striding in "
"a contiguous memory block)."
msgstr ""
"長さ :c:data:`ndim` の :c:type:`Py_ssize_t` の配列。 suboffset の各数値が 0 "
"以上であるとき、その次元に格納されているのはポインタで、 suboffset の値はその"
"ポインタの参照を解決するときに何バイトのオフセットを足すかを示しています。 "
"suboffset に負の数が格納されているときは、参照解決が不要であること (連続した"
"メモリブロック内に直接配置されていること)を意味しています。"
#: ../../c-api/buffer.rst:101
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:104
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:124
msgid ""
"This is a storage for the itemsize (in bytes) of each element of the shared "
"memory. It is technically un-necessary as it can be obtained using :c:func:"
"`PyBuffer_SizeFromFormat`, however an exporter may know this information "
"without parsing the format string and it is necessary to know the itemsize "
"for proper interpretation of striding. Therefore, storing it is more "
"convenient and faster."
msgstr ""
"これは共有メモリ上の各要素のbyte単位のサイズを格納する変数です。これは :c:"
"func:`PyBuffer_SizeFromFormat` を使って計算できる値なので技術的には不要なので"
"すが、バッファを提供する側はフォーマット文字列を解析しなくてもこの情報を知っ"
"ているでしょうし、バッファを受け取る側にとっては正しく解釈するのに必要な情報"
"です。なので、要素サイズを格納するほうが便利ですし高速です。"
#: ../../c-api/buffer.rst:133
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 should never alter this value."
msgstr ""
"バッファを提供する側のオブジェクトが内部的に利用するための変数です。例えば、"
"提供側はこの変数に整数型をキャストして、 shape, strides, suboffsets といった"
"配列をバッファを解放するときに同時に解放するべきかどうかを管理するフラグに使"
"うことができるでしょう。バッファを受け取る側は、この値を変更してはなりませ"
"ん。"
#: ../../c-api/buffer.rst:141
msgid "Buffer related functions"
msgstr "バッファ関連関数"
#: ../../c-api/buffer.rst:146
msgid "Return ``1`` if *obj* supports the buffer interface otherwise ``0``."
msgstr ""
"*obj* がバッファインタフェースをサポートしている場合に ``1`` を、それ以外の場"
"合に ``0`` を返します。"
#: ../../c-api/buffer.rst:151
msgid ""
"Export *obj* into a :c:type:`Py_buffer`, *view*. These arguments must never "
"be *NULL*. The *flags* argument is a bit field indicating what kind of "
"buffer the caller is prepared to deal with and therefore what kind of buffer "
"the exporter is allowed to return. The buffer interface allows for "
"complicated memory sharing possibilities, but some caller may not be able to "
"handle all the complexity but may want to see if the exporter will let them "
"take a simpler view to its memory."
msgstr ""
"*obj* を :c:type:`Py_buffer` *view* へエクスポートします。これらの引数は "
"*NULL* であってはなりません。 *flag* 引数は呼び出し側がどんなバッファを扱おう"
"としているのか、バッファ提供側がどんなバッファを返すことが許されているのかを"
"示す、ビットフィールドです。バッファインタフェースは複雑なメモリ共有を可能に"
"していますが、呼び出し元はすべての複雑なバッファを扱えるとは限らず、バッファ"
"提供側がシンプルなビューを提供できるならそれを利用したいとかもしれません。"
#: ../../c-api/buffer.rst:159
msgid ""
"Some exporters may not be able to share memory in every possible way and may "
"need to raise errors to signal to some consumers that something is just not "
"possible. These errors should be a :exc:`BufferError` unless there is "
"another error that is actually causing the problem. The exporter can use "
"flags information to simplify how much of the :c:data:`Py_buffer` structure "
"is filled in with non-default values and/or raise an error if the object "
"can't support a simpler view of its memory."
msgstr ""
"バッファ提供側はすべての方法でメモリを共有できるとは限らず、呼び出し側に何か"
"が不可能であることを伝えるためにエラーを発生させる必要があるかもしれません。"
"その場合のエラーは、もしその問題を実際に引き起こしているのが別のエラーだった"
"としても、 :exc:`BufferError` でなければなりません。バッファ提供側は flag の"
"情報を使って :c:data:`Py_buffer` 構造体のどのフィールドへの非デフォルト値の設"
"定を省略したり、要求されたシンプルな view を提供できない場合はエラーを発生さ"
"せたりすることができます。"
#: ../../c-api/buffer.rst:167
msgid "``0`` is returned on success and ``-1`` on error."
msgstr "成功したら ``0`` が、エラー時には ``-1`` が返されます。"
#: ../../c-api/buffer.rst:169
msgid "The following table gives possible values to the *flags* arguments."
msgstr "次のテーブルは、 *flags* 引数が取りうる値です。"
#: ../../c-api/buffer.rst:172
msgid "Flag"
msgstr "Flag"
#: ../../c-api/buffer.rst:172
msgid "Description"
msgstr "説明"
#: ../../c-api/buffer.rst:174
msgid ":c:macro:`PyBUF_SIMPLE`"
msgstr ":c:macro:`PyBUF_SIMPLE`"
#: ../../c-api/buffer.rst:174
msgid ""
"This is the default flag state. The returned buffer may or may not have "
"writable memory. The format of the data will be assumed to be unsigned "
"bytes. This is a \"stand-alone\" flag constant. It never needs to be '|'d "
"to the others. The exporter will raise an error if it cannot provide such a "
"contiguous buffer of bytes."
msgstr ""
"これはデフォルトの flag の状態です。結果のバッファは書き込み可能かもしれませ"
"んし、不可能かもしれません。データのフォーマットは unsigned byte とします。こ"
"れは \"スタンドアロン\" のフラグ定数です。他の定数と '|' を取る必要はありませ"
"ん。提供側はこのような連続したバイト列のバッファを提供できない場合に、エラー"
"を発生させるかもしれません。"
#: ../../c-api/buffer.rst:183
msgid ":c:macro:`PyBUF_WRITABLE`"
msgstr ":c:macro:`PyBUF_WRITABLE`"
#: ../../c-api/buffer.rst:183
msgid ""
"The returned buffer must be writable. If it is not writable, then raise an "
"error."
msgstr ""
"結果のバッファは書込み可能でなければなりません。書き込み不可能な場合はエラー"
"を発生させます。"
#: ../../c-api/buffer.rst:186
msgid ":c:macro:`PyBUF_STRIDES`"
msgstr ":c:macro:`PyBUF_STRIDES`"
#: ../../c-api/buffer.rst:186
msgid ""
"This implies :c:macro:`PyBUF_ND`. The returned buffer must provide strides "
"information (i.e. the strides cannot be NULL). This would be used when the "
"consumer can handle strided, discontiguous arrays. Handling strides "
"automatically assumes you can handle shape. The exporter can raise an error "
"if a strided representation of the data is not possible (i.e. without the "
"suboffsets)."
msgstr ""
"この値は :c:macro:`PyBUF_ND` を含みます。バッファは strides 情報を提供しなけ"
"ればなりません。 (言い換えると、 strides は NULL であってはいけません。) この"
"フラグは、呼び出し元が、要素間に隙間のある不連続な配列を扱えるときに使われま"
"す。 strides を扱うことは、自動的に shape も扱えることを要求されます。提供側"
"は stride 形式のバッファを提供できないとき(例えば、 suboffset が必要な場合)は"
"エラーを発生させます。"
#: ../../c-api/buffer.rst:196
msgid ":c:macro:`PyBUF_ND`"
msgstr ":c:macro:`PyBUF_ND`"
#: ../../c-api/buffer.rst:196
msgid ""
"The returned buffer must provide shape information. The memory will be "
"assumed C-style contiguous (last dimension varies the fastest). The exporter "
"may raise an error if it cannot provide this kind of contiguous buffer. If "
"this is not given then shape will be *NULL*."
msgstr ""
"バッファは shape 情報を提供しなければなりません。メモリは C スタイルの並び "
"(最後の次元が一番高速) だと仮定されます。提供側はこの種類の連続バッファを提供"
"できない場合はエラーを発生させます。このフラグが指定されていな場合は shape "
"は *NULL* になります。"
#: ../../c-api/buffer.rst:206
msgid ""
":c:macro:`PyBUF_C_CONTIGUOUS` :c:macro:`PyBUF_F_CONTIGUOUS` :c:macro:"
"`PyBUF_ANY_CONTIGUOUS`"
msgstr ""
":c:macro:`PyBUF_C_CONTIGUOUS` :c:macro:`PyBUF_F_CONTIGUOUS` :c:macro:"
"`PyBUF_ANY_CONTIGUOUS`"
#: ../../c-api/buffer.rst:206
msgid ""
"These flags indicate that the contiguity returned buffer must be "
"respectively, C-contiguous (last dimension varies the fastest), Fortran "
"contiguous (first dimension varies the fastest) or either one. All of these "
"flags imply :c:macro:`PyBUF_STRIDES` and guarantee that the strides buffer "
"info structure will be filled in correctly."
msgstr ""
"これらのフラグは、返されるバッファの並びを指定します。それぞれ、C並び(最後の"
"次元が一番高速)、Fortran並び(最初の次元が一番高速), そのどちらでも、を意味し"
"ます。これらのフラグは :c:macro:`PyBUF_STRIDES` を含んでおり、 strides 情報が"
"正しく格納されていることを保証します。"
#: ../../c-api/buffer.rst:216
msgid ":c:macro:`PyBUF_INDIRECT`"
msgstr ":c:macro:`PyBUF_INDIRECT`"
#: ../../c-api/buffer.rst:216
msgid ""
"This flag indicates the returned buffer must have suboffsets information "
"(which can be NULL if no suboffsets are needed). This can be used when the "
"consumer can handle indirect array referencing implied by these suboffsets. "
"This implies :c:macro:`PyBUF_STRIDES`."
msgstr ""
"このフラグは、返されるバッファが suboffsets 情報を含んでいることを示します。"
"(suboffsets が必要無いときは NULL でもかまいません。) このフラグは、バッファ"
"利用側が suboffsets を使って参照されている間接配列を扱えるときに利用されま"
"す。このフラグは :c:macro:`PyBUF_STRIDES` を含みます。"
#: ../../c-api/buffer.rst:226
msgid ":c:macro:`PyBUF_FORMAT`"
msgstr ":c:macro:`PyBUF_FORMAT`"
#: ../../c-api/buffer.rst:226
msgid ""
"The returned buffer must have true format information if this flag is "
"provided. This would be used when the consumer is going to be checking for "
"what 'kind' of data is actually stored. An exporter should always be able to "
"provide this information if requested. If format is not explicitly requested "
"then the format must be returned as *NULL* (which means ``'B'``, or unsigned "
"bytes)"
msgstr ""
"返されるバッファは正しい format 情報を持っていなければなりません。このフラグ"
"は、バッファ利用側が実際に格納されているデータの '種類' をチェックするときに"
"利用します。バッファ提供側は、要求された場合は常にこの情報を提供できるべきで"
"す。 format が明示的に要求されていない場合は format は *NULL* (``'B'``, "
"unsigned byte を意味する)であるべきです。"
#: ../../c-api/buffer.rst:236
msgid ":c:macro:`PyBUF_STRIDED`"
msgstr ":c:macro:`PyBUF_STRIDED`"
#: ../../c-api/buffer.rst:236
msgid "This is equivalent to ``(PyBUF_STRIDES | PyBUF_WRITABLE)``."
msgstr "``(PyBUF_STRIDES | PyBUF_WRITABLE)`` と同じ"
#: ../../c-api/buffer.rst:239
msgid ":c:macro:`PyBUF_STRIDED_RO`"
msgstr ":c:macro:`PyBUF_STRIDED_RO`"
#: ../../c-api/buffer.rst:239
msgid "This is equivalent to ``(PyBUF_STRIDES)``."
msgstr "``(PyBUF_STRIDES)`` と同じ"
#: ../../c-api/buffer.rst:242
msgid ":c:macro:`PyBUF_RECORDS`"
msgstr ":c:macro:`PyBUF_RECORDS`"
#: ../../c-api/buffer.rst:242
msgid ""
"This is equivalent to ``(PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)``."
msgstr "``(PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)`` と同じ"
#: ../../c-api/buffer.rst:245
msgid ":c:macro:`PyBUF_RECORDS_RO`"
msgstr ":c:macro:`PyBUF_RECORDS_RO`"
#: ../../c-api/buffer.rst:245
msgid "This is equivalent to ``(PyBUF_STRIDES | PyBUF_FORMAT)``."
msgstr "``(PyBUF_STRIDES | PyBUF_FORMAT)`` と同じ"
#: ../../c-api/buffer.rst:248
msgid ":c:macro:`PyBUF_FULL`"
msgstr ":c:macro:`PyBUF_FULL`"
#: ../../c-api/buffer.rst:248
msgid ""
"This is equivalent to ``(PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)``."
msgstr "``(PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)`` と同じ"
#: ../../c-api/buffer.rst:251
msgid ":c:macro:`PyBUF_FULL_RO`"
msgstr ":c:macro:`PyBUF_FULL_RO`"
#: ../../c-api/buffer.rst:251
msgid "This is equivalent to ``(PyBUF_INDIRECT | PyBUF_FORMAT)``."
msgstr "``(PyBUF_INDIRECT | PyBUF_FORMAT)`` と同じ"
#: ../../c-api/buffer.rst:254
msgid ":c:macro:`PyBUF_CONTIG`"
msgstr ":c:macro:`PyBUF_CONTIG`"
#: ../../c-api/buffer.rst:254
msgid "This is equivalent to ``(PyBUF_ND | PyBUF_WRITABLE)``."
msgstr "``(PyBUF_ND | PyBUF_WRITABLE)`` と同じ"
#: ../../c-api/buffer.rst:257
msgid ":c:macro:`PyBUF_CONTIG_RO`"
msgstr ":c:macro:`PyBUF_CONTIG_RO`"
#: ../../c-api/buffer.rst:257
msgid "This is equivalent to ``(PyBUF_ND)``."
msgstr "``(PyBUF_ND)`` と同じ"
#: ../../c-api/buffer.rst:264
msgid ""
"Release the buffer *view*. This should be called when the buffer is no "
"longer being used as it may free memory from it."
msgstr ""
"*view* バッファを解放します。バッファが利用されなくなったときに、そのメモリを"
"解放できるようにこの関数を呼び出すべきです。"
#: ../../c-api/buffer.rst:270
msgid ""
"Return the implied :c:data:`~Py_buffer.itemsize` from the struct-stype :c:"
"data:`~Py_buffer.format`."
msgstr ""
":c:data:`~Py_buffer.itemsize` の値を :c:data:`~PyBuffer.format` から計算して"
"返します。"
#: ../../c-api/buffer.rst:276
msgid ""
"Return ``1`` if the memory defined by the *view* is C-style (*fortran* is "
"``'C'``) or Fortran-style (*fortran* is ``'F'``) contiguous or either one "
"(*fortran* is ``'A'``). Return ``0`` otherwise."
msgstr ""
"*view* で定義されているメモリが、 C スタイル (*fortran* == ``'C'``) のとき"
"か、 Fortran スタイル (*fortran* == ``'F'``) のときか、そのいずれか "
"(*fortran* == ``'A'``) であれば ``1`` を返します。それ以外の場合は ``0`` を返"
"します。"
#: ../../c-api/buffer.rst:283
msgid ""
"Fill the *strides* array with byte-strides of a contiguous (C-style if "
"*fortran* is ``'C'`` or Fortran-style if *fortran* is ``'F'``) array of the "
"given shape with the given number of bytes per element."
msgstr ""
"*strides* 配列を、 *itemsize* の大きさの要素がバイト単位で連続した、 *shape* "
"の形をした (*fortran* が ``'C'`` なら C-style, ``'F'`` なら Fortran-style "
"の) 多次元配列として埋める。"
#: ../../c-api/buffer.rst:290
msgid ""
"Fill in a buffer-info structure, *view*, correctly for an exporter that can "
"only share a contiguous chunk of memory of \"unsigned bytes\" of the given "
"length. Return ``0`` on success and ``-1`` (with raising an error) on error."
msgstr ""
"バッファ提供側が与えられた長さの \"unsigned bytes\" の連続した1つのメモリブ"
"ロックしか提供できないものとして、 *view* バッファ情報構造体を正しく埋める。"
"成功したら ``0`` を、エラー時には (例外を発生させつつ) ``-1`` を返す。"
#: ../../c-api/buffer.rst:296
msgid "MemoryView objects"
msgstr "memoryview オブジェクト"
#: ../../c-api/buffer.rst:300
msgid ""
"A :class:`memoryview` object exposes the new C level buffer interface as a "
"Python object which can then be passed around like any other object."
msgstr ""
":class:`memoryview` オブジェクトは、新しい、他のオブジェクトと同じように扱え"
"る Python オブジェクトの形をした C言語レベルのバッファへのインタフェースで"
"す。"
#: ../../c-api/buffer.rst:305
msgid ""
"Create a memoryview object from an object that defines the new buffer "
"interface."
msgstr ""
"新しいバッファインタフェースを定義しているオブジェクトから memoryview オブ"
"ジェクトを作ります。"
#: ../../c-api/buffer.rst:311
msgid ""
"Create a memoryview object wrapping the given buffer-info structure *view*. "
"The memoryview object then owns the buffer, which means you shouldn't try to "
"release it yourself: it will be released on deallocation of the memoryview "
"object."
msgstr ""
"buffer-info 構造体 *view* をラップする memoryview オブジェクトを作ります。作"
"られた memoryview オブジェクトはバッファを所有することになるので、 *view* を"
"解放してはいけません。このバッファは memoryview オブジェクトが削除されるとき"
"に解放されます。"
#: ../../c-api/buffer.rst:319
msgid ""
"Create a memoryview object to a contiguous chunk of memory (in either 'C' or "
"'F'ortran *order*) from an object that defines the buffer interface. If "
"memory is contiguous, the memoryview object points to the original memory. "
"Otherwise copy is made and the memoryview points to a new bytes object."
msgstr ""
"buffer インタフェースを定義しているオブジェクトから ('C' か 'F'ortran の "
"*order* で) 連続したメモリチャンクへの memoryview オブジェクトを作ります。メ"
"モリが連続している場合、 memoryview オブジェクトは元のメモリを参照します。そ"
"れ以外の場合、メモリはコピーされて、 memoryview オブジェクトは新しい bytes オ"
"ブジェクトを参照します。"
#: ../../c-api/buffer.rst:328
msgid ""
"Return true if the object *obj* is a memoryview object. It is not currently "
"allowed to create subclasses of :class:`memoryview`."
msgstr ""
"*obj* が memoryview オブジェクトの場合に真を返します。現在のところ、 :class:"
"`memoryview` のサブクラスの作成は許可されていません。"
#: ../../c-api/buffer.rst:334
msgid ""
"Return a pointer to the buffer-info structure wrapped by the given object. "
"The object **must** be a memoryview instance; this macro doesn't check its "
"type, you must do it yourself or you will risk crashes."
msgstr ""
"与えられたオブジェクトにラップされた buffer-info 構造体へのポインタを返しま"
"す。オブジェクトは memoryview インスタンスで **なければなりません** 。このマ"
"クロはオブジェクトの型をチェックしないので、呼び出し側で保証しなければクラッ"
"シュする可能性があります。"
#: ../../c-api/buffer.rst:340
msgid "Old-style buffer objects"
msgstr "旧スタイルバッファオブジェクト"
#: ../../c-api/buffer.rst:344
msgid ""
"More information on the old buffer interface is provided in the section :ref:"
"`buffer-structs`, under the description for :c:type:`PyBufferProcs`."
msgstr ""
"古いバッファインタフェースに関するより詳しい情報は、 \"バッファオブジェクト構"
"造体\" 節 ( :ref:`buffer-structs` 節) の、 :c:type:`PyBufferProcs` の説明のと"
"ころにあります。"
#: ../../c-api/buffer.rst:347
msgid ""
"A \"buffer object\" is defined in the :file:`bufferobject.h` header "
"(included by :file:`Python.h`). These objects look very similar to string "
"objects at the Python programming level: they support slicing, indexing, "
"concatenation, and some other standard string operations. However, their "
"data can come from one of two sources: from a block of memory, or from "
"another object which exports the buffer interface."
msgstr ""
"\"バッファオブジェクト\" はヘッダファイル :file:`bufferobject.h` の中で定義さ"
"れています (このファイルは :file:`Python.h` がインクルードしています)。バッ"
"ファオブジェクトは、 Python プログラミングのレベルからは文字列オブジェクトと"
"非常によく似ているように見えます: スライス、インデックス指定、結合、その他標"
"準の文字列操作をサポートしています。しかし、バッファオブジェクトのデータは二"
"つのデータソース: 何らかのメモリブロックか、バッファインタフェースを公開して"
"いる別のオブジェクト、のいずれかに由来しています。"
#: ../../c-api/buffer.rst:354
msgid ""
"Buffer objects are useful as a way to expose the data from another object's "
"buffer interface 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 ""
"バッファオブジェクトは、他のオブジェクトのバッファインタフェースから Python "
"プログラマにデータを公開する方法として便利です。バッファオブジェクトはゼロコ"
"ピーなスライス機構 (zero-copy slicing mechanism) としても使われます。ブロック"
"メモリを参照するというバッファオブジェクトの機能を使うことで、任意のデータを"
"きわめて簡単に Python プログラマに公開できます。メモリブロックは巨大でもかま"
"いませんし、C 拡張モジュール内の定数配列でもかまいません。また、オペレーティ"
"ングシステムライブラリ側に渡す前の、操作用の生のブロックメモリでもかまいませ"
"んし、構造化されたデータをネイティブのメモリ配置形式でやりとりするためにも使"
"えます。"
#: ../../c-api/buffer.rst:366
msgid "This subtype of :c:type:`PyObject` represents a buffer object."
msgstr ""
"この :c:type:`PyObject` のサブタイプはバッファオブジェクトを表現します。"
#: ../../c-api/buffer.rst:373
msgid ""
"The instance of :c:type:`PyTypeObject` which represents the Python buffer "
"type; it is the same object as ``buffer`` and ``types.BufferType`` in the "
"Python layer. ."
msgstr ""
"Python バッファ型 (buffer type) を表現する :c:type:`PyTypeObject` です; "
"Python レイヤにおける ``buffer`` や ``types.BufferType`` と同じオブジェクトで"
"す。"
#: ../../c-api/buffer.rst:380
msgid ""
"This constant may be passed as the *size* parameter to :c:func:"
"`PyBuffer_FromObject` or :c:func:`PyBuffer_FromReadWriteObject`. It "
"indicates that the new :c:type:`PyBufferObject` should refer to *base* "
"object from the specified *offset* to the end of its exported buffer. Using "
"this enables the caller to avoid querying the *base* object for its length."
msgstr ""
"この定数は、 :c:func:`PyBuffer_FromObject` や :c:func:"
"`PyBuffer_FromReadWriteObject` に *size* パラメタとして渡します。このパラメタ"
"を渡すと、 :c:type:`PyBufferObject` は指定された *offset* からバッファの終わ"
"りまでを *base* オブジェクトとして参照します。このパラメタを使うことで、関数"
"の呼び出し側が *base* オブジェクトのサイズを調べる必要がなくなります。"
#: ../../c-api/buffer.rst:390
msgid "Return true if the argument has type :c:data:`PyBuffer_Type`."
msgstr "引数が :c:data:`PyBuffer_Type` 型のときに真を返します。"
#: ../../c-api/buffer.rst:395
msgid ""
"Return a new read-only buffer object. This raises :exc:`TypeError` if "
"*base* doesn't support the read-only buffer protocol or doesn't provide "
"exactly one buffer segment, or it raises :exc:`ValueError` if *offset* is "
"less than zero. The buffer will hold a reference to the *base* object, and "
"the buffer's contents will refer to the *base* object's buffer interface, "
"starting as position *offset* and extending for *size* bytes. If *size* is :"
"const:`Py_END_OF_BUFFER`, then the new buffer's contents extend to the "
"length of the *base* object's exported buffer data."
msgstr ""
"新たな読み出し専用バッファオブジェクトを返します。 *base* が読み出し専用バッ"
"ファに必要なバッファプロトコルをサポートしていない場合や、厳密に一つのバッ"
"ファセグメントを提供していない場合には :exc:`TypeError` を送出し、 *offset* "
"がゼロ以下の場合には :exc:`ValueError` を送出します。バッファオブジェクトは "
"*base* オブジェクトに対する参照を保持し、バッファオブジェクトの内容は *base* "
"オブジェクトの *offset* から *size* バイトのバッファインタフェースへの参照に"
"なります。 *size* が :const:`Py_END_OF_BUFFER` の場合、新たに作成するバッファ"
"オブジェクトの内容は *base* から公開されているバッファの末尾までにわたりま"
"す。"
#: ../../c-api/buffer.rst:404 ../../c-api/buffer.rst:416
msgid ""
"This function used an :c:type:`int` type for *offset* and *size*. This might "
"require changes in your code for properly supporting 64-bit systems."
msgstr ""
"この関数は以前は *offset*, *size* の型に :c:type:`int` を利用していました。こ"
"の変更により、 64bit システムを正しくサポートするには修正が必要になります。"
#: ../../c-api/buffer.rst:412
msgid ""
"Return a new writable buffer object. Parameters and exceptions are similar "
"to those for :c:func:`PyBuffer_FromObject`. If the *base* object does not "
"export the writeable buffer protocol, then :exc:`TypeError` is raised."
msgstr ""
"新たな書き込み可能バッファオブジェクトを返します。パラメタおよび例外は :c:"
"func:`PyBuffer_FromObject` と同じです。 *base* オブジェクトが書き込み可能バッ"
"ファに必要なバッファプロトコルを公開していない場合、 :exc:`TypeError` を送出"
"します。"
#: ../../c-api/buffer.rst:424
msgid ""
"Return a new read-only buffer object that reads from a specified location in "
"memory, with a specified size. The caller is responsible for ensuring that "
"the memory buffer, passed in as *ptr*, is not deallocated while the returned "
"buffer object exists. Raises :exc:`ValueError` if *size* is less than "
"zero. Note that :const:`Py_END_OF_BUFFER` may *not* be passed for the "
"*size* parameter; :exc:`ValueError` will be raised in that case."
msgstr ""
"メモリ上の指定された場所から指定されたサイズのデータを読み出せる、新たな読み"
"出し専用バッファオブジェクトを返します。この関数が返すバッファオブジェクトが"
"存続する間、 *ptr* で与えられたメモリバッファがデアロケートされないようにする"
"のは呼び出し側の責任です。 *size* がゼロ以下の場合には :exc:`ValueError` を送"
"出します。 *size* には :const:`Py_END_OF_BUFFER` を指定しては *いけません* ; "
"指定すると、 :exc:`ValueError` を送出します。"
#: ../../c-api/buffer.rst:431 ../../c-api/buffer.rst:441
#: ../../c-api/buffer.rst:453
msgid ""
"This function used an :c:type:`int` type for *size*. This might require "
"changes in your code for properly supporting 64-bit systems."
msgstr ""
"この関数は以前は *size* の型に :c:type:`int` を利用していました。この変更によ"
"り、 64bit システムを正しくサポートするには修正が必要になります。"
#: ../../c-api/buffer.rst:438
msgid ""
"Similar to :c:func:`PyBuffer_FromMemory`, but the returned buffer is "
"writable."
msgstr ""
":c:func:`PyBuffer_FromMemory` に似ていますが、書き込み可能なバッファを返しま"
"す。"
#: ../../c-api/buffer.rst:448
msgid ""
"Return a new writable buffer object that maintains its own memory buffer of "
"*size* bytes. :exc:`ValueError` is returned if *size* is not zero or "
"positive. Note that the memory buffer (as returned by :c:func:"
"`PyObject_AsWriteBuffer`) is not specifically aligned."
msgstr ""
"*size* バイトのメモリバッファを独自に維持する新たな書き込み可能バッファオブ"
"ジェクトを返します。 *size* がゼロまたは正の値でない場合、 :exc:`ValueError` "
"を送出します。( :c:func:`PyObject_AsWriteBuffer` が返すような) メモリバッファ"
"は特に整列されていないので注意して下さい。"