diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-07 22:46:23 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-07 22:46:23 -0400 |
| commit | d874148760328786c9d12f871a27b97be0774a6d (patch) | |
| tree | 0ab7bc04bcf57e47bcb34209b8b731ec81039cc0 /redo/common_unix.go | |
| parent | dccf548ffa64702bc058d7d8288127212b8bdce0 (diff) | |
Fixed most compilation errors and added GTK+ string helper functions to common_unix.go.
Diffstat (limited to 'redo/common_unix.go')
| -rw-r--r-- | redo/common_unix.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/redo/common_unix.go b/redo/common_unix.go new file mode 100644 index 0000000..e495063 --- /dev/null +++ b/redo/common_unix.go @@ -0,0 +1,22 @@ +// 7 july 2014 + +package ui + +import ( + "unsafe" +) + +// #include "gtk_unix.h" +import "C" + +func fromgstr(s *C.gchar) string { + return C.GoString((*C.char)(unsafe.Pointer(s))) +} + +func togstr(s string) *C.gchar { + return (*C.gchar)(unsafe.Pointer(C.CString(s))) +} + +func freegstr(s *C.gchar) { + C.free(unsafe.Pointer(s)) +} |
