File tree 3 files changed +8
-13
lines changed
3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ All notable changes to `:vips` will be documented in this file.
4
4
5
5
## master
6
6
7
- - fix startup on windows [ West14]
7
+ - improve FFI startup [ West14]
8
8
9
9
## 2.1.1 - 2022-11-13
10
10
Original file line number Diff line number Diff line change 1
1
{
2
2
"require" : {
3
- "jcupitt/vips" : " 2.0.0 "
3
+ "jcupitt/vips" : " 2.1.1 "
4
4
}
5
5
}
Original file line number Diff line number Diff line change @@ -201,17 +201,12 @@ private static function init(): void
201
201
return ;
202
202
}
203
203
204
- // try experimentally binding a bit of stdio ... if this fails, FFI
205
- // has probably not been installed or enabled, and php will throw a
206
- // useful error message
207
- //
208
- // this won't work on windows since there's no run time linker
209
- //
210
- // FIXME ... find a better way to test if FFI has been enabled
211
- if (PHP_OS_FAMILY !== "Windows " ) {
212
- $ stdio = \FFI ::cdef (<<<EOS
213
- int printf(const char *, ...);
214
- EOS );
204
+ // the two usual install problems
205
+ if (!extension_loaded ('ffi ' )) {
206
+ throw new Exception ('FFI extension not loaded ' );
207
+ }
208
+ if (!ini_get ('ffi.enable ' )) {
209
+ throw new Exception ("ffi.enable not set to 'true' " );
215
210
}
216
211
217
212
$ vips_libname = self ::libraryName ("libvips " , 42 );
You can’t perform that action at this time.
0 commit comments