作者:kearsle
项目:Go-SD
// Set a string describing an error to be submitted to the SDL Error system.
func SetError(description string) {
GlobalMutex.Lock()
cdescription := C.CString(description)
C.SetError(cdescription)
C.free(unsafe.Pointer(cdescription))
GlobalMutex.Unlock()
}
作者:gnanderso
项目:Go-SD
// Set a string describing an error to be submitted to the SDL Error system.
func SetError(description string) {
cdescription := C.CString(description)
defer C.free(unsafe.Pointer(cdescription))
C.SetError(cdescription)
}