From 6d67bce9b18ab01d99f636068ab5652857749c32 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 16 May 2014 20:29:16 -0400 Subject: Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too. --- objc_darwin.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'objc_darwin.go') diff --git a/objc_darwin.go b/objc_darwin.go index a94e13a..2d20076 100644 --- a/objc_darwin.go +++ b/objc_darwin.go @@ -22,6 +22,13 @@ func fromNSString(str C.id) string { return C.GoString(C.fromNSString(str)) } +func toBOOL(what bool) C.BOOL { + if what { + return C.YES + } + return C.NO +} + // These consolidate the NSScrollView code (used by listbox_darwin.go and area_darwin.go) into a single place. func newScrollView(content C.id) C.id { -- cgit v1.2.3