PyUnicodeFromString creates the Python Unicode object from the Go string.
(s string)
| 29 | |
| 30 | // PyUnicodeFromString creates the Python Unicode object from the Go string. |
| 31 | func PyUnicodeFromString(s string) *PyObject { |
| 32 | u := C.CString(s) |
| 33 | defer C.free(unsafe.Pointer(u)) |
| 34 | return &PyObject{rawptr: C.PyUnicode_FromString(u)} |
| 35 | } |
no outgoing calls