Skip to content

Commit bed9a1d

Browse files
committed
patch loading For restricted FFI
1 parent f9cdef3 commit bed9a1d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
configuration: tests/phpunit.xml
2828
version: 10.5
2929
php_version: ${{ matrix.php }}
30-
args: --filter ReleaseTest
30+
filter: ReleaseTest
3131

src/CLBlastFactory.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ protected function loadPlatformLib() : void
6767
$filename = __DIR__ . "/../platforms/ubuntu/lib/librindowclblast.so";
6868
//self::$ffipf = FFI::load($headerFile);
6969
$code = file_get_contents($headerFile);
70-
$ffi = FFI::cdef($code,$filename);
70+
$ffi = null;
71+
try {
72+
$ffi = FFI::cdef($code,$filename);
73+
} catch(FFIException $e) {
74+
$ffi = null;
75+
}
7176
self::$ffipf = $ffi;
7277
}
7378

0 commit comments

Comments
 (0)