-
Notifications
You must be signed in to change notification settings - Fork 62
fix: GType wrong size on windows #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @danini-the-panini, thanks for the patch!
I'm puzzled though --- this bug was fixed back in 2017:
a66c1e7#diff-ccdcd22bb3897e42b0b0fc5360672266e29a5984df88d9765d6947e20524051e
Did you base your patch on an older version of ruby-vips?
I can see adding the fix to the inheritance example would be useful.
This is based off of master.
There are two definitions of GType in lib/vips.rb, but only one of the definitions was fixed.
Fixed here (GObject::GType): https://github.com/libvips/ruby-vips/blob/master/lib/vips.rb#L140-L144
Not fixed here (Vips::GType): https://github.com/libvips/ruby-vips/blob/master/lib/vips.rb#L578
I have tested and everything is working fine on Windows once this patch is applied.
Oh wow you're right. Thank you very much for finding this dumb thing.
I'll push out a new version with your fix and credit you in the changelog.
... 2.1.3 pushed with this fix, see 053987b
Uh oh!
There was an error while loading. Please reload this page.
On Windows 64-bit, using 64-bit ruby and 64-bit libvips, I was getting an error that a value for GType was too big for ulong. So I replaced all the instances of
typedef :ulong, :Gtypewith the FFI address check to make sure it is auint64on windows 64-bit