File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ if __err != nil {
448448 retvals [i ] = "cret" + strconv .Itoa (i )
449449 }
450450 if fsym .haserr {
451- retvals [nres - 1 ] = "__err "
451+ retvals [nres - 1 ] = "__err_ret "
452452 }
453453
454454 // Call upstream method and collect returns.
@@ -470,19 +470,19 @@ if __err != nil {
470470 if rvHasErr {
471471 retvals [npyres - 1 ] = "estr" // NOTE: leaked string
472472 g .gofile .Printf ("var estr C.CString\n " )
473- g .gofile .Printf ("if __err != nil {\n " )
473+ g .gofile .Printf ("if __err_ret != nil {\n " )
474474 g .gofile .Indent ()
475- g .gofile .Printf ("estr = C.CString(__err .Error())// NOTE: leaked string\n " ) // NOTE: leaked string
475+ g .gofile .Printf ("estr = C.CString(__err_ret .Error())// NOTE: leaked string\n " ) // NOTE: leaked string
476476 g .gofile .Outdent ()
477477 g .gofile .Printf ("} else {\n " )
478478 g .gofile .Indent ()
479479 g .gofile .Printf ("estr = C.CString(\" \" )// NOTE: leaked string\n " ) // NOTE: leaked string
480480 g .gofile .Outdent ()
481481 g .gofile .Printf ("}\n " )
482482 } else {
483- g .gofile .Printf ("if __err != nil {\n " )
483+ g .gofile .Printf ("if __err_ret != nil {\n " )
484484 g .gofile .Indent ()
485- g .gofile .Printf ("estr := C.CString(__err .Error())\n " ) // NOTE: freed string
485+ g .gofile .Printf ("estr := C.CString(__err_ret .Error())\n " ) // NOTE: freed string
486486 g .gofile .Printf ("C.PyErr_SetString(C.PyExc_RuntimeError, estr)\n " )
487487 g .gofile .Printf ("C.free(unsafe.Pointer(estr))\n " ) // python should have converted, safe
488488 g .gofile .Outdent ()
You can’t perform that action at this time.
0 commit comments