You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On attempting to build the library with 32-bit Go 1.10.1, I received a type conversion error in this function:
// Returns true if the error indicator is set on the given file, i.e. there was// some sort of previous error.func (f*File) HasError() bool {
returnC.al_ferror((*C.ALLEGRO_FILE)(f)) !=0
}
The error is as follows:
allegro\file.go:89: cannot convert 0 (type untyped number) to type _Ctype__Bool
allegro\file.go:89: invalid operation: (func literal)((*_Ctype_struct_ALLEGRO_FILE)(f)) != 0 (mismatched types _Ctype__Bool and int)
I was able to fix it simply by casting C.al_ferror((*C.ALLEGRO_FILE)(f)) to a bool and returning its inverse, but it should be fixed in the repository at some point.
The text was updated successfully, but these errors were encountered:
allegro/file.go:89:11: cannot convert (func literal)() (type _Ctype_int) to type bool
This is with Go 1.14.2 on linux/amd64, but the Allegro docs indicate that this function returns an int and not a bool, so the existing version seems like it should be more correct?
Looking at my copy of the library's code on my computer, it seems as though it is unchanged...
I am currently having trouble updating my Go installation properly, so I'm afraid I can't really help you at the moment.
On attempting to build the library with 32-bit Go 1.10.1, I received a type conversion error in this function:
The error is as follows:
allegro\file.go:89: cannot convert 0 (type untyped number) to type _Ctype__Bool
allegro\file.go:89: invalid operation: (func literal)((*_Ctype_struct_ALLEGRO_FILE)(f)) != 0 (mismatched types _Ctype__Bool and int)
I was able to fix it simply by casting
C.al_ferror((*C.ALLEGRO_FILE)(f))
to a bool and returning its inverse, but it should be fixed in the repository at some point.The text was updated successfully, but these errors were encountered: