Skip to content

Commit e736e51

Browse files
authored
Move FFI functions to a separate class (libvips#147)
* Move FFI functions to a separate class * Ensure libvips can be found on Apple Silicon Allow users to set the `VIPSHOME` env when libvips is installed in a non-standard path. On macOS, always search in `/opt/homebrew/lib/` as a fallback. In most cases, either the `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` env is preferred. On macOS, however, that no longer works since Apple introduced System Integrity Protection (SIP). See: libvips#140. * Prefer the strict equality operator
1 parent adc8a4e commit e736e51

11 files changed

+950
-828
lines changed

src/Config.php

+6-688
Large diffs are not rendered by default.

src/Exception.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class Exception extends \Exception
5454
public function __construct($message = "", $code = 0, \Throwable $previous = null)
5555
{
5656
if ($message == "") {
57-
$message = "libvips error: " . Config::vips()->vips_error_buffer();
58-
Config::vips()->vips_error_clear();
57+
$message = "libvips error: " . FFI::vips()->vips_error_buffer();
58+
FFI::vips()->vips_error_clear();
5959
}
6060

6161
Utils::errorLog($message);

0 commit comments

Comments
 (0)