Skip to content

Commit 7d4b11a

Browse files
authored
#1168 extending/newtypes.po
1 parent 5fb7ff6 commit 7d4b11a

1 file changed

Lines changed: 78 additions & 62 deletions

File tree

extending/newtypes.po

Lines changed: 78 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ msgstr ""
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-11 20:40+0000\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12-
"Last-Translator: Dong-gweon Oh <flowdas@gmail.com>\n"
12+
"Last-Translator: Mir Jung <ham4051@gmail.com>\n"
1313
"Language-Team: Korean (https://python.flowdas.com)\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=utf-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"Generated-By: Babel 2.17.0\n"
17+
"Generated-By: Babel 2.18.0\n"
1818

1919
#: ../../extending/newtypes.rst:7
2020
msgid "Defining Extension Types: Assorted Topics"
@@ -35,7 +35,7 @@ msgstr ""
3535
":c:type:`PyTypeObject`\\의 정의입니다:"
3636

3737
#: ../../extending/newtypes.rst:17
38-
#, fuzzy, python-brace-format
38+
#, python-brace-format
3939
msgid ""
4040
"typedef struct _typeobject {\n"
4141
" PyObject_VAR_HEAD\n"
@@ -158,7 +158,7 @@ msgstr ""
158158
" PySequenceMethods *tp_as_sequence;\n"
159159
" PyMappingMethods *tp_as_mapping;\n"
160160
"\n"
161-
" /* 더 많은 표준 연산 (바이너리 호환성을 위해 여기에) */\n"
161+
" /* 더 많은 표준 연산 (여기서는 바이너리 호환성을 위해) */\n"
162162
"\n"
163163
" hashfunc tp_hash;\n"
164164
" ternaryfunc tp_call;\n"
@@ -175,7 +175,7 @@ msgstr ""
175175
" const char *tp_doc; /* 설명서 문자열 */\n"
176176
"\n"
177177
" /* 릴리스 2.0에서 할당된 의미 */\n"
178-
" /* 모든 액세스 가능한 객체에 대한 호출 함수 */\n"
178+
" /* 액세스 할 수 있는 모든 객체를 호출하는 함수 */\n"
179179
" traverseproc tp_traverse;\n"
180180
"\n"
181181
" /* 포함된 객체에 대한 참조 삭제 */\n"
@@ -193,11 +193,11 @@ msgstr ""
193193
" iternextfunc tp_iternext;\n"
194194
"\n"
195195
" /* 어트리뷰트 디스크립터와 서브 클래싱 */\n"
196-
" struct PyMethodDef *tp_methods;\n"
197-
" struct PyMemberDef *tp_members;\n"
198-
" struct PyGetSetDef *tp_getset;\n"
199-
" // 힙 형에는 강한 참조, 정적 형에는 빌려온 참조\n"
200-
" struct _typeobject *tp_base;\n"
196+
" PyMethodDef *tp_methods;\n"
197+
" PyMemberDef *tp_members;\n"
198+
" PyGetSetDef *tp_getset;\n"
199+
" // 힙 형에는 강한 참조, 정적 형에는 빌린 참조\n"
200+
" PyTypeObject *tp_base;\n"
201201
" PyObject *tp_dict;\n"
202202
" descrgetfunc tp_descr_get;\n"
203203
" descrsetfunc tp_descr_set;\n"
@@ -209,20 +209,30 @@ msgstr ""
209209
" inquiry tp_is_gc; /* PyObject_IS_GC 용 */\n"
210210
" PyObject *tp_bases;\n"
211211
" PyObject *tp_mro; /* 메서드 결정 순서 */\n"
212-
" PyObject *tp_cache;\n"
213-
" PyObject *tp_subclasses;\n"
214-
" PyObject *tp_weaklist;\n"
212+
" PyObject *tp_cache; /* 더 이상 사용되지 않음 */\n"
213+
" void *tp_subclasses; /* 정적 내장 형의 경우 인덱스로 사용 */\n"
214+
" PyObject *tp_weaklist; /* 정적 내장 형에는 사용되지 않음 */\n"
215215
" destructor tp_del;\n"
216216
"\n"
217-
" /* 형 어트리뷰트 캐시 버전 태그. 버전 2.6에서 추가되었습니다 */\n"
217+
" /* 형 어트리뷰트 캐시 버전 태그. 버전 2.6에서 추가되었습니다.\n"
218+
" * 0이면, 캐시가 유효하지 않으며 초기화해야 합니다.\n"
219+
" */\n"
218220
" unsigned int tp_version_tag;\n"
219221
"\n"
220222
" destructor tp_finalize;\n"
221223
" vectorcallfunc tp_vectorcall;\n"
222224
"\n"
223-
" /* 이 형을 신경 쓰는 형 감시자의 비트 세트 */\n"
225+
" /* 이 형을 신경 쓰는 형 감시자의 비트셋 */\n"
224226
" unsigned char tp_watched;\n"
225-
"} PyTypeObject;\n"
227+
"\n"
228+
" /* 사용된 tp_version_tag 값의 수.\n"
229+
" * 이 형에 대해 어트리뷰트 캐시가 비활성화된 경우\n"
230+
" * (예를 들어 커스텀 MRO 항목으로 인해)\n"
231+
" * _Py_ATTR_CACHE_UNUSED로 설정됩니다.\n"
232+
" * 그렇지 않으면, MAX_VERSIONS_PER_CLASS (다른 곳에 정의됨)로 제한됩니다.\n"
233+
" */\n"
234+
" uint16_t tp_versions_used;\n"
235+
"} PyTypeObject;"
226236

227237
#: ../../extending/newtypes.rst:20
228238
msgid ""
@@ -312,7 +322,7 @@ msgstr ""
312322
" 예는 다음과 같습니다::"
313323

314324
#: ../../extending/newtypes.rst:72
315-
#, fuzzy, python-brace-format
325+
#, python-brace-format
316326
msgid ""
317327
"static void\n"
318328
"newdatatype_dealloc(PyObject *op)\n"
@@ -323,10 +333,11 @@ msgid ""
323333
"}"
324334
msgstr ""
325335
"static void\n"
326-
"newdatatype_dealloc(newdatatypeobject *obj)\n"
336+
"newdatatype_dealloc(PyObject *op)\n"
327337
"{\n"
328-
" free(obj->obj_UnderlyingDatatypePtr);\n"
329-
" Py_TYPE(obj)->tp_free((PyObject *)obj);\n"
338+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
339+
" free(self->obj_UnderlyingDatatypePtr);\n"
340+
" Py_TYPE(self)->tp_free(self);\n"
330341
"}"
331342

332343
#: ../../extending/newtypes.rst:80
@@ -338,7 +349,7 @@ msgstr ""
338349
" 합니다::"
339350

340351
#: ../../extending/newtypes.rst:83
341-
#, fuzzy, python-brace-format
352+
#, python-brace-format
342353
msgid ""
343354
"static void\n"
344355
"newdatatype_dealloc(PyObject *op)\n"
@@ -351,12 +362,13 @@ msgid ""
351362
"}"
352363
msgstr ""
353364
"static void\n"
354-
"newdatatype_dealloc(newdatatypeobject *obj)\n"
365+
"newdatatype_dealloc(PyObject *op)\n"
355366
"{\n"
356-
" PyObject_GC_UnTrack(obj);\n"
357-
" Py_CLEAR(obj->other_obj);\n"
367+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
368+
" PyObject_GC_UnTrack(op);\n"
369+
" Py_CLEAR(self->other_obj);\n"
358370
" ...\n"
359-
" Py_TYPE(obj)->tp_free((PyObject *)obj);\n"
371+
" Py_TYPE(self)->tp_free(self);\n"
360372
"}"
361373

362374
#: ../../extending/newtypes.rst:97
@@ -382,7 +394,6 @@ msgstr ""
382394
":c:func:`PyErr_Fetch`\\와 :c:func:`PyErr_Restore` 함수를 사용하여 수행할 수 있습니다::"
383395

384396
#: ../../extending/newtypes.rst:109
385-
#, fuzzy
386397
msgid ""
387398
"static void\n"
388399
"my_dealloc(PyObject *obj)\n"
@@ -425,17 +436,19 @@ msgstr ""
425436
" PyErr_Fetch(&err_type, &err_value, &err_traceback);\n"
426437
"\n"
427438
" cbresult = PyObject_CallNoArgs(self->my_callback);\n"
428-
" if (cbresult == NULL)\n"
429-
" PyErr_WriteUnraisable(self->my_callback);\n"
430-
" else\n"
439+
" if (cbresult == NULL) {\n"
440+
" PyErr_WriteUnraisable(self->my_callback);\n"
441+
" }\n"
442+
" else {\n"
431443
" Py_DECREF(cbresult);\n"
444+
" }\n"
432445
"\n"
433446
" /* 저장된 예외 상태를 복원합니다 */\n"
434447
" PyErr_Restore(err_type, err_value, err_traceback);\n"
435448
"\n"
436449
" Py_DECREF(self->my_callback);\n"
437450
" }\n"
438-
" Py_TYPE(obj)->tp_free((PyObject*)self);\n"
451+
" Py_TYPE(self)->tp_free(self);\n"
439452
"}"
440453

441454
#: ../../extending/newtypes.rst:138
@@ -506,7 +519,7 @@ msgstr ""
506519
"합니다. 다음은 간단한 예입니다::"
507520

508521
#: ../../extending/newtypes.rst:174
509-
#, fuzzy, python-format
522+
#, python-format
510523
msgid ""
511524
"static PyObject *\n"
512525
"newdatatype_repr(PyObject *op)\n"
@@ -517,10 +530,11 @@ msgid ""
517530
"}"
518531
msgstr ""
519532
"static PyObject *\n"
520-
"newdatatype_repr(newdatatypeobject *obj)\n"
533+
"newdatatype_repr(PyObject *op)\n"
521534
"{\n"
535+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
522536
" return PyUnicode_FromFormat(\"Repr-ified_newdatatype{{size:%d}}\",\n"
523-
" obj->obj_UnderlyingDatatypePtr->size);\n"
537+
" self->obj_UnderlyingDatatypePtr->size);\n"
524538
"}"
525539

526540
#: ../../extending/newtypes.rst:182
@@ -556,7 +570,7 @@ msgid "Here is a simple example::"
556570
msgstr "다음은 간단한 예입니다::"
557571

558572
#: ../../extending/newtypes.rst:195
559-
#, fuzzy, python-format
573+
#, python-format
560574
msgid ""
561575
"static PyObject *\n"
562576
"newdatatype_str(PyObject *op)\n"
@@ -567,10 +581,11 @@ msgid ""
567581
"}"
568582
msgstr ""
569583
"static PyObject *\n"
570-
"newdatatype_str(newdatatypeobject *obj)\n"
584+
"newdatatype_str(PyObject *op)\n"
571585
"{\n"
586+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
572587
" return PyUnicode_FromFormat(\"Stringified_newdatatype{{size:%d}}\",\n"
573-
" obj->obj_UnderlyingDatatypePtr->size);\n"
588+
" self->obj_UnderlyingDatatypePtr->size);\n"
574589
"}"
575590

576591
#: ../../extending/newtypes.rst:206
@@ -838,7 +853,7 @@ msgid "Here is an example::"
838853
msgstr "예는 다음과 같습니다::"
839854

840855
#: ../../extending/newtypes.rst:337
841-
#, fuzzy, python-format
856+
#, python-format
842857
msgid ""
843858
"static PyObject *\n"
844859
"newdatatype_getattr(PyObject *op, char *name)\n"
@@ -855,16 +870,16 @@ msgid ""
855870
"}"
856871
msgstr ""
857872
"static PyObject *\n"
858-
"newdatatype_getattr(newdatatypeobject *obj, char *name)\n"
873+
"newdatatype_getattr(PyObject *op, char *name)\n"
859874
"{\n"
860-
" if (strcmp(name, \"data\") == 0)\n"
861-
" {\n"
862-
" return PyLong_FromLong(obj->data);\n"
875+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
876+
" if (strcmp(name, \"data\") == 0) {\n"
877+
" return PyLong_FromLong(self->data);\n"
863878
" }\n"
864879
"\n"
865880
" PyErr_Format(PyExc_AttributeError,\n"
866881
" \"'%.100s' object has no attribute '%.400s'\",\n"
867-
" Py_TYPE(obj)->tp_name, name);\n"
882+
" Py_TYPE(self)->tp_name, name);\n"
868883
" return NULL;\n"
869884
"}"
870885

@@ -885,7 +900,7 @@ msgstr ""
885900
"``NULL``\\로 설정되어야 합니다. ::"
886901

887902
#: ../../extending/newtypes.rst:357
888-
#, fuzzy, python-brace-format, python-format
903+
#, python-brace-format, python-format
889904
msgid ""
890905
"static int\n"
891906
"newdatatype_setattr(PyObject *op, char *name, PyObject *v)\n"
@@ -895,7 +910,7 @@ msgid ""
895910
"}"
896911
msgstr ""
897912
"static int\n"
898-
"newdatatype_setattr(newdatatypeobject *obj, char *name, PyObject *v)\n"
913+
"newdatatype_setattr(PyObject *op, char *name, PyObject *v)\n"
899914
"{\n"
900915
" PyErr_Format(PyExc_RuntimeError, \"Read-only attribute: %s\", name);\n"
901916
" return -1;\n"
@@ -944,7 +959,6 @@ msgid ""
944959
msgstr "내부 포인터의 크기가 같으면 같다고 간주하는 데이터형에 대한 샘플 구현은 다음과 같습니다::"
945960

946961
#: ../../extending/newtypes.rst:387
947-
#, fuzzy
948962
msgid ""
949963
"static PyObject *\n"
950964
"newdatatype_richcmp(PyObject *lhs, PyObject *rhs, int op)\n"
@@ -973,14 +987,15 @@ msgid ""
973987
" }"
974988
msgstr ""
975989
"static PyObject *\n"
976-
"newdatatype_richcmp(newdatatypeobject *obj1, newdatatypeobject *obj2, int"
977-
" op)\n"
990+
"newdatatype_richcmp(PyObject *lhs, PyObject *rhs, int op)\n"
978991
"{\n"
992+
" newdatatypeobject *obj1 = (newdatatypeobject *) lhs;\n"
993+
" newdatatypeobject *obj2 = (newdatatypeobject *) rhs;\n"
979994
" PyObject *result;\n"
980995
" int c, size1, size2;\n"
981996
"\n"
982997
" /* 두 인자가 모두 newdatatype 형인지 확인하는 코드는\n"
983-
" 생략했습니다 */\n"
998+
" 생략되었습니다 */\n"
984999
"\n"
9851000
" size1 = obj1->obj_UnderlyingDatatypePtr->size;\n"
9861001
" size2 = obj2->obj_UnderlyingDatatypePtr->size;\n"
@@ -994,8 +1009,7 @@ msgstr ""
9941009
" case Py_GE: c = size1 >= size2; break;\n"
9951010
" }\n"
9961011
" result = c ? Py_True : Py_False;\n"
997-
" Py_INCREF(result);\n"
998-
" return result;\n"
1012+
" return Py_NewRef(result);\n"
9991013
" }"
10001014

10011015
#: ../../extending/newtypes.rst:415
@@ -1069,7 +1083,6 @@ msgid ""
10691083
msgstr "여러분이 제공하기로 선택했다면, 이 함수는 데이터형의 인스턴스에 대한 해시 숫자를 반환해야 합니다. 다음은 간단한 예입니다::"
10701084

10711085
#: ../../extending/newtypes.rst:448
1072-
#, fuzzy, python-brace-format
10731086
msgid ""
10741087
"static Py_hash_t\n"
10751088
"newdatatype_hash(PyObject *op)\n"
@@ -1084,12 +1097,14 @@ msgid ""
10841097
"}"
10851098
msgstr ""
10861099
"static Py_hash_t\n"
1087-
"newdatatype_hash(newdatatypeobject *obj)\n"
1100+
"newdatatype_hash(PyObject *op)\n"
10881101
"{\n"
1102+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
10891103
" Py_hash_t result;\n"
1090-
" result = obj->some_size + 32767 * obj->some_number;\n"
1091-
" if (result == -1)\n"
1092-
" result = -2;\n"
1104+
" result = self->some_size + 32767 * self->some_number;\n"
1105+
" if (result == -1) {\n"
1106+
" result = -2;\n"
1107+
" }\n"
10931108
" return result;\n"
10941109
"}"
10951110

@@ -1158,7 +1173,7 @@ msgid "Here is a toy ``tp_call`` implementation::"
11581173
msgstr "장난감 ``tp_call`` 구현은 다음과 같습니다::"
11591174

11601175
#: ../../extending/newtypes.rst:489
1161-
#, fuzzy, python-format
1176+
#, python-format
11621177
msgid ""
11631178
"static PyObject *\n"
11641179
"newdatatype_call(PyObject *op, PyObject *args, PyObject *kwds)\n"
@@ -1181,8 +1196,9 @@ msgid ""
11811196
"}"
11821197
msgstr ""
11831198
"static PyObject *\n"
1184-
"newdatatype_call(newdatatypeobject *obj, PyObject *args, PyObject *kwds)\n"
1199+
"newdatatype_call(PyObject *op, PyObject *args, PyObject *kwds)\n"
11851200
"{\n"
1201+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
11861202
" PyObject *result;\n"
11871203
" const char *arg1;\n"
11881204
" const char *arg2;\n"
@@ -1194,7 +1210,7 @@ msgstr ""
11941210
" result = PyUnicode_FromFormat(\n"
11951211
" \"Returning -- value: [%d] arg1: [%s] arg2: [%s] arg3: [%s]\\n\","
11961212
"\n"
1197-
" obj->obj_UnderlyingDatatypePtr->size,\n"
1213+
" self->obj_UnderlyingDatatypePtr->size,\n"
11981214
" arg1, arg2, arg3);\n"
11991215
" return result;\n"
12001216
"}"
@@ -1339,7 +1355,7 @@ msgstr ""
13391355
"모든 약한 참조를 지울 필요가 있다는 것입니다::"
13401356

13411357
#: ../../extending/newtypes.rst:575
1342-
#, fuzzy, python-brace-format
1358+
#, python-brace-format
13431359
msgid ""
13441360
"static void\n"
13451361
"Trivial_dealloc(PyObject *op)\n"
@@ -1351,12 +1367,12 @@ msgid ""
13511367
"}"
13521368
msgstr ""
13531369
"static void\n"
1354-
"Trivial_dealloc(TrivialObject *self)\n"
1370+
"Trivial_dealloc(PyObject *op)\n"
13551371
"{\n"
13561372
" /* 파괴자를 호출하기 전에 먼저 약한 참조를 지웁니다 */\n"
1357-
" PyObject_ClearWeakRefs((PyObject *) self);\n"
1373+
" PyObject_ClearWeakRefs(op);\n"
13581374
" /* ... 간결성을 위해 생략된 나머지 파괴 코드 ... */\n"
1359-
" Py_TYPE(self)->tp_free((PyObject *) self);\n"
1375+
" Py_TYPE(op)->tp_free(op);\n"
13601376
"}"
13611377

13621378
#: ../../extending/newtypes.rst:586

0 commit comments

Comments
 (0)