Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 13ebba3

Browse files
authored
Fix broken assertion; minor other fixes (#233)
1 parent 57b593a commit 13ebba3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/FFI.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ public static function version(): string
163163
*/
164164
public static function atLeast(int $x, int $y, int $z = 0): bool
165165
{
166-
return self::$library_major > $x ||
167-
self::$library_major == $x && self::$library_minor > $y ||
168-
self::$library_major == $x && self::$library_minor == $y && self::$library_micro >= $z;
166+
return self::$library_major > $x
167+
|| (self::$library_major === $x && self::$library_minor > $y)
168+
|| (self::$library_major === $x && self::$library_minor === $y && self::$library_micro >= $z);
169169
}
170170

171171
/**

‎src/GObject.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure
152152
?CData $data
153153
) use (&$callback): void {
154154
assert($numberOfParams === 3);
155-
/*
155+
/**
156156
* Signature: gint64(VipsSourceCustom* source, void* buffer, gint64 length, void* handle)
157157
*/
158158
$bufferLength = (int)FFI::gobject()->g_value_get_int64(\FFI::addr($params[2]));
@@ -180,7 +180,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure
180180
?CData $data
181181
) use (&$callback): void {
182182
assert($numberOfParams === 3);
183-
/*
183+
/**
184184
* Signature: gint64(VipsSourceCustom* source, gint64 offset, int whence, void* handle)
185185
*/
186186
$offset = (int)FFI::gobject()->g_value_get_int64(\FFI::addr($params[1]));
@@ -201,7 +201,7 @@ private static function getMarshaler(string $name, callable $callback): ?Closure
201201
?CData $data
202202
) use (&$callback): void {
203203
assert($numberOfParams === 3);
204-
/*
204+
/**
205205
* Signature: gint64(VipsTargetCustom* target, void* buffer, gint64 length, void* handle)
206206
*/
207207
$bufferPointer = FFI::gobject()->g_value_get_pointer(\FFI::addr($params[1]));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /