Aleksandr Kuzmenko 5 лет назад
Родитель
Сommit
de803f95e8
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      std/php/Global.hx
  2. 1 1
      std/php/_std/sys/io/FileInput.hx
  3. 1 1
      std/php/_std/sys/io/FileOutput.hx

+ 1 - 1
std/php/Global.hx

@@ -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

+ 1 - 1
std/php/_std/sys/io/FileInput.hx

@@ -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');
 	}
 

+ 1 - 1
std/php/_std/sys/io/FileOutput.hx

@@ -73,7 +73,7 @@ class FileOutput extends haxe.io.Output {
 				w = SEEK_END;
 		}
 		var r = fseek(__f, p, w);
-		if (r == false)
+		if (r == -1)
 			throw haxe.io.Error.Custom('An error occurred');
 	}