(dir string)
| 37 | } |
| 38 | |
| 39 | func AddToPath(dir string) { |
| 40 | p := C.CString("path") |
| 41 | defer C.free(unsafe.Pointer(p)) |
| 42 | |
| 43 | sys_path := C.PySys_GetObject(p) |
| 44 | if sys_path == nil { |
| 45 | return |
| 46 | } |
| 47 | |
| 48 | s := C.CString(dir) |
| 49 | defer C.free(unsafe.Pointer(s)) |
| 50 | |
| 51 | pDir := C.PyString_FromString(s) |
| 52 | if pDir == nil { |
| 53 | return |
| 54 | } |
| 55 | |
| 56 | C.PyList_Append(sys_path, pDir) |
| 57 | } |
| 58 | |
| 59 | func Main(args []string) int { |
| 60 | argv := make([]*C.char, len(args)) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…