File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,12 @@ msgid ""
408408"        c = c + b\n" 
409409"    return c" 
410410msgstr  "" 
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 
413419msgid  "then the result should be:" 
@@ -439,6 +445,10 @@ msgid ""
439445"/* Error checking of pName left out */\n" 
440446"pModule = PyImport_Import(pName);" 
441447msgstr  "" 
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 
444454msgid  "" 
@@ -461,6 +471,13 @@ msgid ""
461471"}\n" 
462472"Py_XDECREF(pFunc);" 
463473msgstr  "" 
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 
466483msgid  "" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments