Skip to content

Commit bf38f94

Browse files
Copilotmattwang44
andcommitted
Complete translation of extending/embedding.po - 57/59 messages (96.6%) translated
Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent ede6176 commit bf38f94

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

extending/embedding.po

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,12 @@ msgid ""
408408
" c = c + b\n"
409409
" return c"
410410
msgstr ""
411+
"def multiply(a,b):\n"
412+
" print(\"Will compute\", a, \"times\", b)\n"
413+
" c = 0\n"
414+
" for i in range(0, a):\n"
415+
" c = c + b\n"
416+
" return c"
411417

412418
#: ../../extending/embedding.rst:180
413419
msgid "then the result should be:"
@@ -439,6 +445,10 @@ msgid ""
439445
"/* Error checking of pName left out */\n"
440446
"pModule = PyImport_Import(pName);"
441447
msgstr ""
448+
"Py_Initialize();\n"
449+
"pName = PyUnicode_DecodeFSDefault(argv[1]);\n"
450+
"/* Error checking of pName left out */\n"
451+
"pModule = PyImport_Import(pName);"
442452

443453
#: ../../extending/embedding.rst:197
444454
msgid ""
@@ -461,6 +471,13 @@ msgid ""
461471
"}\n"
462472
"Py_XDECREF(pFunc);"
463473
msgstr ""
474+
"pFunc = PyObject_GetAttrString(pModule, argv[2]);\n"
475+
"/* pFunc is a new reference */\n"
476+
"\n"
477+
"if (pFunc && PyCallable_Check(pFunc)) {\n"
478+
" ...\n"
479+
"}\n"
480+
"Py_XDECREF(pFunc);"
464481

465482
#: ../../extending/embedding.rst:210
466483
msgid ""

0 commit comments

Comments
 (0)