@@ -79,7 +79,6 @@ msgstr ""
7979" 될 수 있습니다."
8080
8181#: ../../c-api/buffer.rst:45
82- #, fuzzy
8382msgid ""
8483"An example consumer of the buffer interface is the "
8584":meth:`~io.BufferedIOBase.write` method of file objects: any object that "
@@ -91,7 +90,7 @@ msgid ""
9190" or reject exporting of read-write and read-only buffers."
9291msgstr ""
9392"버퍼 인터페이스의 소비자 예는 파일 객체의 :meth:`~io.BufferedIOBase.write` 메서드입니다: 버퍼 "
94- "인터페이스를 통해 일련의 바이트를 내보낼 수 있는 모든 객체는 파일에 기록될 수 있습니다. :meth:`write`\\ 가 전달된 "
93+ "인터페이스를 통해 일련의 바이트를 내보낼 수 있는 모든 객체는 파일에 기록될 수 있습니다. :meth:`! write`\\ 가 전달된 "
9594"객체의 내부 내용에 대한 읽기 전용 액세스만 필요하지만, :meth:`~io.BufferedIOBase.readinto`\\ 와 같은"
9695" 다른 메서드는 인자의 내용에 쓰기 액세스가 필요합니다. 버퍼 인터페이스는 객체가 읽기-쓰기와 읽기 전용 버퍼를 선택적으로 "
9796"허용하거나 거부할 수 있도록 합니다."
@@ -184,15 +183,15 @@ msgid ""
184183msgstr ":term:`연속 <contiguous>` 배열의 경우, 값은 메모리 블록의 시작을 가리킵니다."
185184
186185#: ../../c-api/buffer.rst:104
187- #, fuzzy
188186msgid ""
189187"A new reference to the exporting object. The reference is owned by the "
190188"consumer and automatically released (i.e. reference count decremented) "
191189"and set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the "
192190"equivalent of the return value of any standard C-API function."
193191msgstr ""
194192"제공하는(exporting) 객체에 대한 새 참조. 참조는 소비자가 소유하고, :c:func:`PyBuffer_Release`\\ 에"
195- " 의해 자동으로 감소하고 ``NULL``\\ 로 설정됩니다. 이 필드는 표준 C-API 함수의 반환 값과 동등합니다."
193+ " 의해 자동으로 해제되고 (즉 참조 횟수가 감소합니다) ``NULL``\\ 로 설정됩니다. 이 필드는 표준 C-API 함수의 반환 "
194+ "값과 동등합니다."
196195
197196#: ../../c-api/buffer.rst:111
198197msgid ""
@@ -273,21 +272,19 @@ msgstr ""
273272":c:member:`~Py_buffer.itemsize`\\ 를 무시하고 ``itemsize == 1``\\ 로 가정해야 합니다."
274273
275274#: ../../c-api/buffer.rst:152
276- #, fuzzy
277275msgid ""
278276"A *NULL* terminated string in :mod:`struct` module style syntax "
279277"describing the contents of a single item. If this is ``NULL``, ``\" B\" `` "
280278"(unsigned bytes) is assumed."
281279msgstr ""
282- "단일 항목의 내용을 설명하는 :mod:`struct` 모듈 스타일 문법의 *NUL * 종료 문자열. 이것이 ``NULL``\\ 이면, "
283- "``\" B\" ``\\ (부호 없는 바이트)를 가정합니다."
280+ "단일 항목의 내용을 설명하는 :mod:`struct` 모듈 스타일 문법의 *NULL * 종료 문자열. 이것이 ``NULL``\\ 이면,"
281+ " ``\" B\" ``\\ (부호 없는 바이트)를 가정합니다."
284282
285283#: ../../c-api/buffer.rst:156
286284msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
287285msgstr "이 필드는 :c:macro:`PyBUF_FORMAT` 플래그로 제어됩니다."
288286
289287#: ../../c-api/buffer.rst:160
290- #, fuzzy
291288msgid ""
292289"The number of dimensions the memory represents as an n-dimensional array."
293290" If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item "
@@ -299,7 +296,7 @@ msgstr ""
299296"메모리가 n 차원 배열로 나타내는 차원 수. ``0``\\ 이면, :c:member:`~Py_buffer.buf`\\ 는 스칼라를 "
300297"나타내는 단일 항목을 가리 킵니다. 이 경우, :c:member:`~Py_buffer.shape`, "
301298":c:member:`~Py_buffer.strides` 및 :c:member:`~Py_buffer.suboffsets`\\ 는 반드시"
302- " ``NULL`` 이어야 합니다."
299+ " ``NULL`` 이어야 합니다. 최대 차원 수는 :c:macro:`PyBUF_MAX_NDIM` \\ 으로 지정됩니다. "
303300
304301#: ../../c-api/buffer.rst:168
305302msgid ""
@@ -394,18 +391,17 @@ msgstr ""
394391
395392#: ../../c-api/buffer.rst:218
396393msgid "Constants:"
397- msgstr ""
394+ msgstr "상수: "
398395
399396#: ../../c-api/buffer.rst:222
400- #, fuzzy
401397msgid ""
402398"The maximum number of dimensions the memory represents. Exporters MUST "
403399"respect this limit, consumers of multi-dimensional buffers SHOULD be able"
404400" to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to "
405401"64."
406402msgstr ""
407- "매크로 :c:macro:`PyBUF_MAX_NDIM` \\ 는 최대 차원 수를 64로 제한합니다 . 제공자는 이 제한을 존중해야 하며, "
408- "다차원 버퍼의 소비자는 :c:macro:`PyBUF_MAX_NDIM` 차원까지 처리할 수 있어야 합니다."
403+ "메모리가 나타내는 최대 차원 수 입니다 . 제공자는 이 제한을 존중해야 하며, 다차원 버퍼의 소비자는 "
404+ ":c:macro:`! PyBUF_MAX_NDIM` 차원까지 처리할 수 있어야 합니다. 현재 64로 설정되었습니다 ."
409405
410406#: ../../c-api/buffer.rst:231
411407msgid "Buffer request types"
@@ -423,11 +419,10 @@ msgstr ""
423419"*flags* 인자를 사용합니다."
424420
425421#: ../../c-api/buffer.rst:238
426- #, fuzzy
427422msgid ""
428423"All :c:type:`Py_buffer` fields are unambiguously defined by the request "
429424"type."
430- msgstr "모든 :c:data :`Py_buffer` 필드는 요청 유형에 의해 모호하지 않게 정의됩니다."
425+ msgstr "모든 :c:type :`Py_buffer` 필드는 요청 유형에 의해 모호하지 않게 정의됩니다."
431426
432427#: ../../c-api/buffer.rst:242
433428msgid "request-independent fields"
@@ -450,7 +445,6 @@ msgid "readonly, format"
450445msgstr "readonly, format"
451446
452447#: ../../c-api/buffer.rst:252
453- #, fuzzy
454448msgid ""
455449"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter "
456450"MUST provide a writable buffer or else report failure. Otherwise, the "
@@ -461,7 +455,8 @@ msgid ""
461455msgstr ""
462456":c:member:`~Py_buffer.readonly` 필드를 제어합니다. 설정되면, 제공자는 반드시 쓰기 가능한 버퍼를 "
463457"제공하거나 실패를 보고해야 합니다. 그렇지 않으면, 제공자는 읽기 전용 버퍼나 쓰기 가능 버퍼를 제공할 수 있지만, 모든 소비자에 "
464- "대해 일관성을 유지해야 합니다."
458+ "대해 일관성을 유지해야 합니다. 예를 들어, 간단한 쓰기 가능 버퍼를 요청하려면 :c:expr:`PyBUF_SIMPLE | "
459+ "PyBUF_WRITABLE`\\ 을 사용할 수 있습니다."
465460
466461#: ../../c-api/buffer.rst:260
467462msgid ""
@@ -483,14 +478,14 @@ msgstr ""
483478"플래그로 사용되어 간단한 쓰기 가능한 버퍼를 요청할 수 있습니다."
484479
485480#: ../../c-api/buffer.rst:268
486- #, fuzzy
487481msgid ""
488482":c:macro:`PyBUF_FORMAT` must be \\ |'d to any of the flags except "
489483":c:macro:`PyBUF_SIMPLE`, because the latter already implies format ``B`` "
490484"(unsigned bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own."
491485msgstr ""
492- ":c:macro:`PyBUF_FORMAT`\\ 은 :c:macro:`PyBUF_SIMPLE`\\ 을 제외한 임의의 플래그와 \\ | 될 "
493- "수 있습니다. PyBUF_SIMPLE은 이미 형식 ``B``\\ (부호 없는 바이트)를 의미합니다."
486+ ":c:macro:`PyBUF_FORMAT`\\ 은 :c:macro:`PyBUF_SIMPLE`\\ 을 제외한 임의의 플래그와 \\ | "
487+ "되어야 합니다. PyBUF_SIMPLE 은 이미 형식 ``B``\\ (부호 없는 바이트)를 의미하기 때문입니다. "
488+ ":c:macro:`!PyBUF_FORMAT`\\ 은 단독으로 사용할 수 없습니다."
494489
495490#: ../../c-api/buffer.rst:274
496491msgid "shape, strides, suboffsets"
@@ -677,6 +672,9 @@ msgid ""
677672"strides[n-1];\n"
678673"item = *((typeof(item) *)ptr);"
679674msgstr ""
675+ "ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
676+ "strides[n-1];\n"
677+ "item = *((typeof(item) *)ptr);"
680678
681679#: ../../c-api/buffer.rst:375
682680msgid ""
@@ -716,6 +714,30 @@ msgid ""
716714"\n"
717715" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
718716msgstr ""
717+ "def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n"
718+ " \"\"\" 매개 변수가 할당된 메모리 범위 내에서 유효한 배열을 나타내는지 확인합니다:\n"
719+ " char *mem: 물리적 메모리 블록의 시작\n"
720+ " memlen: 물리적 메모리 블록의 길이\n"
721+ " offset: (char *)buf - mem\n"
722+ " \"\"\" \n"
723+ " if offset % itemsize:\n"
724+ " return False\n"
725+ " if offset < 0 or offset+itemsize > memlen:\n"
726+ " return False\n"
727+ " if any(v % itemsize for v in strides):\n"
728+ " return False\n"
729+ "\n"
730+ " if ndim <= 0:\n"
731+ " return ndim == 0 and not shape and not strides\n"
732+ " if 0 in shape:\n"
733+ " return True\n"
734+ "\n"
735+ " imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
736+ " if strides[j] <= 0)\n"
737+ " imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
738+ " if strides[j] > 0)\n"
739+ "\n"
740+ " return 0 <= offset+imin and offset+imax+itemsize <= memlen"
719741
720742#: ../../c-api/buffer.rst:409
721743msgid "PIL-style: shape, strides and suboffsets"
@@ -761,6 +783,18 @@ msgid ""
761783" return (void*)pointer;\n"
762784"}"
763785msgstr ""
786+ "void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n"
787+ " Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n"
788+ " char *pointer = (char*)buf;\n"
789+ " int i;\n"
790+ " for (i = 0; i < ndim; i++) {\n"
791+ " pointer += strides[i] * indices[i];\n"
792+ " if (suboffsets[i] >=0 ) {\n"
793+ " pointer = *((char**)pointer) + suboffsets[i];\n"
794+ " }\n"
795+ " }\n"
796+ " return (void*)pointer;\n"
797+ "}"
764798
765799#: ../../c-api/buffer.rst:439
766800msgid "Buffer-related functions"
@@ -778,15 +812,14 @@ msgstr ""
778812"성공합니다."
779813
780814#: ../../c-api/buffer.rst:450
781- #, fuzzy
782815msgid ""
783816"Send a request to *exporter* to fill in *view* as specified by *flags*. "
784817"If the exporter cannot provide a buffer of the exact type, it MUST raise "
785818":exc:`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
786819msgstr ""
787820"*flags*\\ 에 지정된 대로 *view*\\ 를 채우도록 *exporter*\\ 에게 요청을 보냅니다. 제공자(exporter)가 "
788- "정확한 유형의 버퍼를 제공할 수 없다면, :c:data:`PyExc_BufferError `\\ 를 일으키고, "
789- "``view->obj`` \\ 를 `` NULL``\\ 로 설정하고, ``-1``\\ 를 반환해야 합니다."
821+ "정확한 유형의 버퍼를 제공할 수 없다면, :exc:`BufferError `\\ 를 일으키고, ``view->obj`` \\ 를 "
822+ "``NULL``\\ 로 설정하고, ``-1``\\ 를 반환해야 합니다."
790823
791824#: ../../c-api/buffer.rst:455
792825msgid ""
@@ -813,15 +846,15 @@ msgstr ""
813846"소비자가 버퍼로 작업한 후에는, :c:func:`PyBuffer_Release`\\ 를 정확히 한 번 호출해야 합니다."
814847
815848#: ../../c-api/buffer.rst:468
816- #, fuzzy
817849msgid ""
818850"Release the buffer *view* and release the :term:`strong reference` (i.e. "
819851"decrement the reference count) to the view's supporting object, "
820852"``view->obj``. This function MUST be called when the buffer is no longer "
821853"being used, otherwise reference leaks may occur."
822854msgstr ""
823- "버퍼 *view*\\ 를 해제하고 ``view->obj``\\ 에 대한 참조 횟수를 감소시킵니다. 버퍼가 더는 사용되지 않을 때, 이 "
824- "함수를 반드시 호출해야 합니다. 그렇지 않으면 참조 누수가 발생할 수 있습니다."
855+ "버퍼 *view*\\ 를 해제하고 뷰의 지원 객체인 ``view->obj``\\ 에 대한 :term:`강한 참조 <strong "
856+ "reference>`\\ 를 해제합니다 (즉 참조 횟수를 감소시킵니다). 버퍼가 더는 사용되지 않을 때, 이 함수를 반드시 호출해야 "
857+ "합니다. 그렇지 않으면 참조 누수가 발생할 수 있습니다."
825858
826859#: ../../c-api/buffer.rst:473
827860msgid ""
@@ -830,13 +863,12 @@ msgid ""
830863msgstr ":c:func:`PyObject_GetBuffer`\\ 를 통해 얻지 않은 버퍼에 이 함수를 호출하는 것은 에러입니다."
831864
832865#: ../../c-api/buffer.rst:479
833- #, fuzzy
834866msgid ""
835867"Return the implied :c:member:`~Py_buffer.itemsize` from "
836868":c:member:`~Py_buffer.format`. On error, raise an exception and return "
837869"-1."
838870msgstr ""
839- ":c:data :`~Py_buffer.format`\\ 이 암시하는 :c:data :`~Py_buffer.itemsize`\\ 를 "
871+ ":c:member :`~Py_buffer.format`\\ 이 암시하는 :c:member :`~Py_buffer.itemsize`\\ 를 "
840872"반환합니다. 에러가 발생하면, 예외를 발생시키고 -1을 반환합니다."
841873
842874#: ../../c-api/buffer.rst:487
@@ -923,15 +955,14 @@ msgstr ""
923955"*view*\\ 를 채웁니다."
924956
925957#: ../../c-api/buffer.rst:538
926- #, fuzzy
927958msgid ""
928959"On success, set ``view->obj`` to a new reference to *exporter* and return"
929960" 0. Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` "
930961"and return ``-1``;"
931962msgstr ""
932963"성공하면, ``view->obj``\\ 를 *exporter*\\ 에 대한 새 참조로 설정하고, 0을 반환합니다. 그렇지 않으면, "
933- ":c:data:`PyExc_BufferError `\\ 를 일으키고, ``view->obj``\\ 를 ``NULL``\\ 로 설정한 다음 "
934- "``-1`` \\ 을 반환합니다."
964+ ":exc:`BufferError `\\ 를 일으키고, ``view->obj``\\ 를 ``NULL``\\ 로 설정한 다음 ``-1`` \\ 을 "
965+ " 반환합니다."
935966
936967#: ../../c-api/buffer.rst:542
937968msgid ""
@@ -944,40 +975,34 @@ msgstr ""
944975"*exporter*\\ 가 ``NULL``\\ 이어야 합니다."
945976
946977#: ../../c-api/buffer.rst:3
947- #, fuzzy
948978msgid "buffer protocol"
949979msgstr "버퍼 프로토콜"
950980
951981#: ../../c-api/buffer.rst:3
952- #, fuzzy
953982msgid "buffer interface"
954- msgstr "버퍼 구조체 "
983+ msgstr "버퍼 인터페이스 "
955984
956985#: ../../c-api/buffer.rst:3
957- #, fuzzy
958986msgid "(see buffer protocol)"
959- msgstr "버퍼 프로토콜 "
987+ msgstr "( 버퍼 프로토콜을 보십시오) "
960988
961989#: ../../c-api/buffer.rst:3
962- #, fuzzy
963990msgid "buffer object"
964- msgstr "버퍼 프로토콜 "
991+ msgstr "버퍼 객체 "
965992
966993#: ../../c-api/buffer.rst:32
967994msgid "PyBufferProcs (C type)"
968- msgstr ""
995+ msgstr "PyBufferProcs (C 형) "
969996
970997#: ../../c-api/buffer.rst:295
971- #, fuzzy
972998msgid "contiguous"
973- msgstr "연속성 "
999+ msgstr "연속 "
9741000
9751001#: ../../c-api/buffer.rst:295
976- #, fuzzy
9771002msgid "C-contiguous"
978- msgstr "연속성 "
1003+ msgstr "C-연속 "
9791004
9801005#: ../../c-api/buffer.rst:295
9811006msgid "Fortran contiguous"
982- msgstr ""
1007+ msgstr "포트란 연속 "
9831008
0 commit comments