A c float is a fpc single, right?
If yes, then there was a heavy bug in the gtk2 bindings. Attached patch fixes the gfloat.
Mattias

Mailing lists / fpc-devel / 2005-06
8 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
A c float is a fpc single, right?
If yes, then there was a heavy bug in the gtk2 bindings. Attached patch fixes the gfloat.
Mattias
Mattias Gaertner wroteA c float is a fpc single, right? If yes, then there was a heavy bug in the gtk2 bindings. Attached patch fixes the gfloat.
Which attachment :)?
A c float is a fpc single, right? If yes, then there was a heavy bug in the gtk2…
A c float is a fpc single, right?
Yes, AFAIK.
If yes, then there was a heavy bug in the gtk2 bindings. Attached patch fixes the gfloat.
There is no patch ?
Micha
Take this.
Mattias
Applied, hopefully it is correct ;)
On Tue, 14 Jun 2005 22:34:19 +0200 Take this. Mattias
So why did you do:
- {$IFDEF KYLIX}
- gfloat = single; // Don't know why, but some routines requires this
- {$ELSE}
- gfloat = double;
- {$ENDIF}
+ gfloat = double;If you weren't using KYLIX, nothing has changed :S, shouldn't that be:
+ gfloat = single;?
Micha
You are right, I'm right, but my patch was insufficient. Of course it must be single.
Marko Peric pointed me to a strange bug with some gtk2 examples translated to pascal. After some debugging I saw, that with double it doesn't work, but with single it works. According to the gtk2 sources and docs, gfloat must be a c float. So definitely double is wrong and single works in my test cases. I tested it with gtk2forpascal. But at the moment I have some trouble building fpc and its rpms. Maybe the gfloat bug explains some of the strange lazarus gtk2 interface bugs.
The reason, why this bug was not spotted before, is that the gtk2 always bounds all gfloat input. This results in most cases to no effect, not even a warning.
Mattias
Changed again. The correct solution would be imo to use the ctypes unit and make it a cfloat. Mattias, afaik you've write permissions to the fpc repository so you can do further changes to the gtk2 interface units yourself :)