Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 78 additions & 62 deletions extending/newtypes.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-11 20:40+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dong-gweon Oh <flowdas@gmail.com>\n"
"Last-Translator: Mir Jung <ham4051@gmail.com>\n"
"Language-Team: Korean (https://python.flowdas.com)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"
"Generated-By: Babel 2.18.0\n"

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

#: ../../extending/newtypes.rst:17
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"typedef struct _typeobject {\n"
" PyObject_VAR_HEAD\n"
Expand Down Expand Up @@ -158,7 +158,7 @@ msgstr ""
" PySequenceMethods *tp_as_sequence;\n"
" PyMappingMethods *tp_as_mapping;\n"
"\n"
" /* 더 많은 표준 연산 (바이너리 호환성을 위해 여기에) */\n"
" /* 더 많은 표준 연산 (여기서는 바이너리 호환성을 위해) */\n"
"\n"
" hashfunc tp_hash;\n"
" ternaryfunc tp_call;\n"
Expand All @@ -175,7 +175,7 @@ msgstr ""
" const char *tp_doc; /* 설명서 문자열 */\n"
"\n"
" /* 릴리스 2.0에서 할당된 의미 */\n"
" /* 모든 액세스 가능한 객체에 대한 호출 함수 */\n"
" /* 액세스 할 수 있는 모든 객체를 호출하는 함수 */\n"
" traverseproc tp_traverse;\n"
"\n"
" /* 포함된 객체에 대한 참조 삭제 */\n"
Expand All @@ -193,11 +193,11 @@ msgstr ""
" iternextfunc tp_iternext;\n"
"\n"
" /* 어트리뷰트 디스크립터와 서브 클래싱 */\n"
" struct PyMethodDef *tp_methods;\n"
" struct PyMemberDef *tp_members;\n"
" struct PyGetSetDef *tp_getset;\n"
" // 힙 형에는 강한 참조, 정적 형에는 빌려온 참조\n"
" struct _typeobject *tp_base;\n"
" PyMethodDef *tp_methods;\n"
" PyMemberDef *tp_members;\n"
" PyGetSetDef *tp_getset;\n"
" // 힙 형에는 강한 참조, 정적 형에는 빌린 참조\n"
" PyTypeObject *tp_base;\n"
" PyObject *tp_dict;\n"
" descrgetfunc tp_descr_get;\n"
" descrsetfunc tp_descr_set;\n"
Expand All @@ -209,20 +209,30 @@ msgstr ""
" inquiry tp_is_gc; /* PyObject_IS_GC 용 */\n"
" PyObject *tp_bases;\n"
" PyObject *tp_mro; /* 메서드 결정 순서 */\n"
" PyObject *tp_cache;\n"
" PyObject *tp_subclasses;\n"
" PyObject *tp_weaklist;\n"
" PyObject *tp_cache; /* 더 이상 사용되지 않음 */\n"
" void *tp_subclasses; /* 정적 내장 형의 경우 인덱스로 사용 */\n"
" PyObject *tp_weaklist; /* 정적 내장 형에는 사용되지 않음 */\n"
" destructor tp_del;\n"
"\n"
" /* 형 어트리뷰트 캐시 버전 태그. 버전 2.6에서 추가되었습니다 */\n"
" /* 형 어트리뷰트 캐시 버전 태그. 버전 2.6에서 추가되었습니다.\n"
" * 0이면, 캐시가 유효하지 않으며 초기화해야 합니다.\n"
" */\n"
" unsigned int tp_version_tag;\n"
"\n"
" destructor tp_finalize;\n"
" vectorcallfunc tp_vectorcall;\n"
"\n"
" /* 이 형을 신경 쓰는 형 감시자의 비트 세트 */\n"
" /* 이 형을 신경 쓰는 형 감시자의 비트셋 */\n"
" unsigned char tp_watched;\n"
"} PyTypeObject;\n"
"\n"
" /* 사용된 tp_version_tag 값의 수.\n"
" * 이 형에 대해 어트리뷰트 캐시가 비활성화된 경우\n"
" * (예를 들어 커스텀 MRO 항목으로 인해)\n"
" * _Py_ATTR_CACHE_UNUSED로 설정됩니다.\n"
" * 그렇지 않으면, MAX_VERSIONS_PER_CLASS (다른 곳에 정의됨)로 제한됩니다.\n"
" */\n"
" uint16_t tp_versions_used;\n"
"} PyTypeObject;"

#: ../../extending/newtypes.rst:20
msgid ""
Expand Down Expand Up @@ -312,7 +322,7 @@ msgstr ""
" 예는 다음과 같습니다::"

#: ../../extending/newtypes.rst:72
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"static void\n"
"newdatatype_dealloc(PyObject *op)\n"
Expand All @@ -323,10 +333,11 @@ msgid ""
"}"
msgstr ""
"static void\n"
"newdatatype_dealloc(newdatatypeobject *obj)\n"
"newdatatype_dealloc(PyObject *op)\n"
"{\n"
" free(obj->obj_UnderlyingDatatypePtr);\n"
" Py_TYPE(obj)->tp_free((PyObject *)obj);\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" free(self->obj_UnderlyingDatatypePtr);\n"
" Py_TYPE(self)->tp_free(self);\n"
"}"

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

#: ../../extending/newtypes.rst:83
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"static void\n"
"newdatatype_dealloc(PyObject *op)\n"
Expand All @@ -351,12 +362,13 @@ msgid ""
"}"
msgstr ""
"static void\n"
"newdatatype_dealloc(newdatatypeobject *obj)\n"
"newdatatype_dealloc(PyObject *op)\n"
"{\n"
" PyObject_GC_UnTrack(obj);\n"
" Py_CLEAR(obj->other_obj);\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" PyObject_GC_UnTrack(op);\n"
" Py_CLEAR(self->other_obj);\n"
" ...\n"
" Py_TYPE(obj)->tp_free((PyObject *)obj);\n"
" Py_TYPE(self)->tp_free(self);\n"
"}"

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

#: ../../extending/newtypes.rst:109
#, fuzzy
msgid ""
"static void\n"
"my_dealloc(PyObject *obj)\n"
Expand Down Expand Up @@ -425,17 +436,19 @@ msgstr ""
" PyErr_Fetch(&err_type, &err_value, &err_traceback);\n"
"\n"
" cbresult = PyObject_CallNoArgs(self->my_callback);\n"
" if (cbresult == NULL)\n"
" PyErr_WriteUnraisable(self->my_callback);\n"
" else\n"
" if (cbresult == NULL) {\n"
" PyErr_WriteUnraisable(self->my_callback);\n"
" }\n"
" else {\n"
" Py_DECREF(cbresult);\n"
" }\n"
"\n"
" /* 저장된 예외 상태를 복원합니다 */\n"
" PyErr_Restore(err_type, err_value, err_traceback);\n"
"\n"
" Py_DECREF(self->my_callback);\n"
" }\n"
" Py_TYPE(obj)->tp_free((PyObject*)self);\n"
" Py_TYPE(self)->tp_free(self);\n"
"}"

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

#: ../../extending/newtypes.rst:174
#, fuzzy, python-format
#, python-format
msgid ""
"static PyObject *\n"
"newdatatype_repr(PyObject *op)\n"
Expand All @@ -517,10 +530,11 @@ msgid ""
"}"
msgstr ""
"static PyObject *\n"
"newdatatype_repr(newdatatypeobject *obj)\n"
"newdatatype_repr(PyObject *op)\n"
"{\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" return PyUnicode_FromFormat(\"Repr-ified_newdatatype{{size:%d}}\",\n"
" obj->obj_UnderlyingDatatypePtr->size);\n"
" self->obj_UnderlyingDatatypePtr->size);\n"
"}"

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

#: ../../extending/newtypes.rst:195
#, fuzzy, python-format
#, python-format
msgid ""
"static PyObject *\n"
"newdatatype_str(PyObject *op)\n"
Expand All @@ -567,10 +581,11 @@ msgid ""
"}"
msgstr ""
"static PyObject *\n"
"newdatatype_str(newdatatypeobject *obj)\n"
"newdatatype_str(PyObject *op)\n"
"{\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" return PyUnicode_FromFormat(\"Stringified_newdatatype{{size:%d}}\",\n"
" obj->obj_UnderlyingDatatypePtr->size);\n"
" self->obj_UnderlyingDatatypePtr->size);\n"
"}"

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

#: ../../extending/newtypes.rst:337
#, fuzzy, python-format
#, python-format
msgid ""
"static PyObject *\n"
"newdatatype_getattr(PyObject *op, char *name)\n"
Expand All @@ -855,16 +870,16 @@ msgid ""
"}"
msgstr ""
"static PyObject *\n"
"newdatatype_getattr(newdatatypeobject *obj, char *name)\n"
"newdatatype_getattr(PyObject *op, char *name)\n"
"{\n"
" if (strcmp(name, \"data\") == 0)\n"
" {\n"
" return PyLong_FromLong(obj->data);\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" if (strcmp(name, \"data\") == 0) {\n"
" return PyLong_FromLong(self->data);\n"
" }\n"
"\n"
" PyErr_Format(PyExc_AttributeError,\n"
" \"'%.100s' object has no attribute '%.400s'\",\n"
" Py_TYPE(obj)->tp_name, name);\n"
" Py_TYPE(self)->tp_name, name);\n"
" return NULL;\n"
"}"

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

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

#: ../../extending/newtypes.rst:387
#, fuzzy
msgid ""
"static PyObject *\n"
"newdatatype_richcmp(PyObject *lhs, PyObject *rhs, int op)\n"
Expand Down Expand Up @@ -973,14 +987,15 @@ msgid ""
" }"
msgstr ""
"static PyObject *\n"
"newdatatype_richcmp(newdatatypeobject *obj1, newdatatypeobject *obj2, int"
" op)\n"
"newdatatype_richcmp(PyObject *lhs, PyObject *rhs, int op)\n"
"{\n"
" newdatatypeobject *obj1 = (newdatatypeobject *) lhs;\n"
" newdatatypeobject *obj2 = (newdatatypeobject *) rhs;\n"
" PyObject *result;\n"
" int c, size1, size2;\n"
"\n"
" /* 두 인자가 모두 newdatatype 형인지 확인하는 코드는\n"
" 생략했습니다 */\n"
" 생략되었습니다 */\n"
"\n"
" size1 = obj1->obj_UnderlyingDatatypePtr->size;\n"
" size2 = obj2->obj_UnderlyingDatatypePtr->size;\n"
Expand All @@ -994,8 +1009,7 @@ msgstr ""
" case Py_GE: c = size1 >= size2; break;\n"
" }\n"
" result = c ? Py_True : Py_False;\n"
" Py_INCREF(result);\n"
" return result;\n"
" return Py_NewRef(result);\n"
" }"

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

#: ../../extending/newtypes.rst:448
#, fuzzy, python-brace-format
msgid ""
"static Py_hash_t\n"
"newdatatype_hash(PyObject *op)\n"
Expand All @@ -1084,12 +1097,14 @@ msgid ""
"}"
msgstr ""
"static Py_hash_t\n"
"newdatatype_hash(newdatatypeobject *obj)\n"
"newdatatype_hash(PyObject *op)\n"
"{\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" Py_hash_t result;\n"
" result = obj->some_size + 32767 * obj->some_number;\n"
" if (result == -1)\n"
" result = -2;\n"
" result = self->some_size + 32767 * self->some_number;\n"
" if (result == -1) {\n"
" result = -2;\n"
" }\n"
" return result;\n"
"}"

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

#: ../../extending/newtypes.rst:489
#, fuzzy, python-format
#, python-format
msgid ""
"static PyObject *\n"
"newdatatype_call(PyObject *op, PyObject *args, PyObject *kwds)\n"
Expand All @@ -1181,8 +1196,9 @@ msgid ""
"}"
msgstr ""
"static PyObject *\n"
"newdatatype_call(newdatatypeobject *obj, PyObject *args, PyObject *kwds)\n"
"newdatatype_call(PyObject *op, PyObject *args, PyObject *kwds)\n"
"{\n"
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
" PyObject *result;\n"
" const char *arg1;\n"
" const char *arg2;\n"
Expand All @@ -1194,7 +1210,7 @@ msgstr ""
" result = PyUnicode_FromFormat(\n"
" \"Returning -- value: [%d] arg1: [%s] arg2: [%s] arg3: [%s]\\n\","
"\n"
" obj->obj_UnderlyingDatatypePtr->size,\n"
" self->obj_UnderlyingDatatypePtr->size,\n"
" arg1, arg2, arg3);\n"
" return result;\n"
"}"
Expand Down Expand Up @@ -1339,7 +1355,7 @@ msgstr ""
"모든 약한 참조를 지울 필요가 있다는 것입니다::"

#: ../../extending/newtypes.rst:575
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"static void\n"
"Trivial_dealloc(PyObject *op)\n"
Expand All @@ -1351,12 +1367,12 @@ msgid ""
"}"
msgstr ""
"static void\n"
"Trivial_dealloc(TrivialObject *self)\n"
"Trivial_dealloc(PyObject *op)\n"
"{\n"
" /* 파괴자를 호출하기 전에 먼저 약한 참조를 지웁니다 */\n"
" PyObject_ClearWeakRefs((PyObject *) self);\n"
" PyObject_ClearWeakRefs(op);\n"
" /* ... 간결성을 위해 생략된 나머지 파괴 코드 ... */\n"
" Py_TYPE(self)->tp_free((PyObject *) self);\n"
" Py_TYPE(op)->tp_free(op);\n"
"}"

#: ../../extending/newtypes.rst:586
Expand Down