@@ -3,6 +3,7 @@
Bugfixes:
php : fixed false detection of `catch` vars in anonymous functions as captured from outer scope
+ php : fixed return type of extern definition for `fseek` function
2020-07-22 4.1.3
@@ -638,7 +638,7 @@ extern class Global {
/**
@see http://php.net/manual/en/function.fseek.php
**/
- static function fseek(handle:Resource, offset:Int, ?whence:Int):EitherType<Int, Bool>;
+ static function fseek(handle:Resource, offset:Int, ?whence:Int):Int;
@see http://php.net/manual/en/function.ftell.php
@@ -76,7 +76,7 @@ class FileInput extends haxe.io.Input {
w = SEEK_END;
}
var r = fseek(__f, p, w);
- if (r == false)
+ if (r == -1)
throw Custom('An error occurred');
@@ -73,7 +73,7 @@ class FileOutput extends haxe.io.Output {
throw haxe.io.Error.Custom('An error occurred');