-
Notifications
You must be signed in to change notification settings - Fork 26
Fix Windows and 32-bit support #146
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
- Move FFI functions to a separate class. - Split the GLib and GObject symbols into a separate string. - Ensure `g_*` functions are called via `libglib-2.0-0.dll` or `libgobject-2.0-0.dll` on Windows. - Fix 32-bit support, use `PHP_INT_SIZE` to determine `GType`. - Remove debug code in `GValue::toEnum`. - Prefer to call `cast` on the static `\FFI` class. - Remove `Config::error()` in favor of `throw new Exception()`, move error buffer logic to `Vips\Exception`. - Remove `GsfOutputCsvQuotingMode` class. - Remove `Config::printAll`, already exists as `VipsObject::printAll`. - Move `Config::filenameGetFilename` and `Config::filenameGetOptions` to Utils class.
I've moved the FFI functions back to |
Sorry for sitting on this, I've been horribly busy this week. I'll read it now. |
Oh I forgot to say, we should update the CHANGELOG and bump the version number. |
This all looks great -- fixes the issue, and includes lots of useful cleanups. I was groaning and rolling my eyes and thinking I'd need to spend half a day sorting out this linking problem, but you've done it all, and very well! Nice job. |
... I added a short CHANGELOG note and tagged it as 2.0.3. |
Oop, I always forget that |
Change summary:
Move FFI functions to a separate class.Reverted with commit f3086e4.g_*
functions are called vialibglib-2.0-0.dll
orlibgobject-2.0-0.dll
on Windows.PHP_INT_SIZE
to determineGType
.GValue::toEnum
.cast
on the static\FFI
class.Config::error()
in favor ofthrow new Exception()
, move error buffer logic toVips\Exception
.GsfOutputCsvQuotingMode
class.Config::printAll
, already exists asVipsObject::printAll
.Config::filenameGetFilename
andConfig::filenameGetOptions
to Utils class.This was successfully tested on my Windows PC using the 64-bit libvips binaries. I also fixed 32-bit support, but for some reason this results in OOM errors (I was able to get the test suite to pass when I disabled the
NewTest
andWriteTest
, fwiw).(This PR got a bit bigger than I initially thought, I could split the changes if necessary)
Resolves: #144.