Ejemplo n.º 1
0
func command_serverlist() {
	var p [1]*C.char
	ng := C.vimremote_serverlist(&p[0])
	defer C.vimremote_free(unsafe.Pointer(p[0]))
	if ng != 0 {
		panic("vimremote_serverlist() failed")
	}
	print(C.GoString(p[0]))
}
Ejemplo n.º 2
0
func remote_expr(servername string, expr string) string {
	a := C.CString(servername)
	defer C.free(unsafe.Pointer(a))
	b := C.CString(expr)
	defer C.free(unsafe.Pointer(b))
	var p [1]*C.char
	ng := C.vimremote_remoteexpr(a, b, &p[0])
	defer C.vimremote_free(unsafe.Pointer(p[0]))
	if ng != 0 {
		panic("vimremote_remoteexpr() failed: " + C.GoString(p[0]))
	}
	return C.GoString(p[0])
}