@@ -152,13 +152,13 @@ func (me *C.io_registry_entry_t) GetStringProperty(key string) (string, error) {
152
152
}
153
153
defer C .CFRelease (property )
154
154
155
- if ptr := C .CFStringGetCStringPtr (property , 0 ); ptr != nil {
155
+ if ptr := C .CFStringGetCStringPtr (( C . CFStringRef )( unsafe . Pointer ( property )) , 0 ); ptr != nil {
156
156
return C .GoString (ptr ), nil
157
157
}
158
158
// in certain circumstances CFStringGetCStringPtr may return NULL
159
159
// and we must retrieve the string by copy
160
160
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 {
162
162
return "" , fmt .Errorf ("Property '%s' can't be converted" , key )
163
163
}
164
164
return C .GoString (& buff [0 ]), nil
@@ -173,7 +173,7 @@ func (me *C.io_registry_entry_t) GetIntProperty(key string, intType C.CFNumberTy
173
173
}
174
174
defer C .CFRelease (property )
175
175
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 {
177
177
return res , fmt .Errorf ("Property '%s' can't be converted or has been truncated" , key )
178
178
}
179
179
return res , nil
0 commit comments