fix Py_EnterRecursiveCall C.free sequence

master
M_noAria 2021-10-05 17:13:27 +08:00 committed by maxime mouial
parent 03d93fb21b
commit 040a1b43c6
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ import (
//Py_EnterRecursiveCall : https://docs.python.org/3/c-api/exceptions.html#c.Py_EnterRecursiveCall //Py_EnterRecursiveCall : https://docs.python.org/3/c-api/exceptions.html#c.Py_EnterRecursiveCall
func Py_EnterRecursiveCall(where string) int { func Py_EnterRecursiveCall(where string) int {
cwhere := C.CString(where) cwhere := C.CString(where)
C.free(unsafe.Pointer(cwhere)) defer C.free(unsafe.Pointer(cwhere))
return int(C._go_Py_EnterRecursiveCall(cwhere)) return int(C._go_Py_EnterRecursiveCall(cwhere))
} }