@@ -152,13 +152,13 @@ func (me *C.io_registry_entry_t) GetStringProperty(key string) (string, error) {
152152 }
153153 defer C .CFRelease (property )
154154
155- if ptr := C .CFStringGetCStringPtr (property , 0 ); ptr != nil {
155+ if ptr := C .CFStringGetCStringPtr (( C . CFStringRef )( unsafe . Pointer ( property )) , 0 ); ptr != nil {
156156 return C .GoString (ptr ), nil
157157 }
158158 // in certain circumstances CFStringGetCStringPtr may return NULL
159159 // and we must retrieve the string by copy
160160 buff := make ([]C.char , 1024 )
161- if C .CFStringGetCString (property , & buff [0 ], 1024 , 0 ) != C .true {
161+ if C .CFStringGetCString (( C . CFStringRef )( property ) , & buff [0 ], 1024 , 0 ) != C .true {
162162 return "" , fmt .Errorf ("Property '%s' can't be converted" , key )
163163 }
164164 return C .GoString (& buff [0 ]), nil
@@ -173,7 +173,7 @@ func (me *C.io_registry_entry_t) GetIntProperty(key string, intType C.CFNumberTy
173173 }
174174 defer C .CFRelease (property )
175175 var res int
176- if C .CFNumberGetValue (property , intType , unsafe .Pointer (& res )) != C .true {
176+ if C .CFNumberGetValue (( C . CFNumberRef )( property ) , intType , unsafe .Pointer (& res )) != C .true {
177177 return res , fmt .Errorf ("Property '%s' can't be converted or has been truncated" , key )
178178 }
179179 return res , nil
0 commit comments