Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to luv 0.5.13 #11761

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion haxe.opam
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ depends: [
"conf-libpcre2-8"
"conf-zlib"
"conf-neko"
"luv" {= "0.5.12"}
"luv" {>= "0.5.13"}
"ipaddr"
"terminal_size"
]
8 changes: 4 additions & 4 deletions src/macro/eval/evalLuv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@ let fs_event_fields = [
) events
in
encode_obj [
key_file,vnative_string file;
key_file,encode_nullable vnative_string file;
key_events,encode_array vevents;
]
) v4
Expand Down Expand Up @@ -2175,7 +2175,7 @@ let env_fields = [
let time_fields = [
"getTimeOfDay", vfun0 (fun() ->
encode_result (fun (t:Time.t) ->
encode_obj [key_sec,VInt64 t.tv_sec; key_usec,vint32 t.tv_usec]
encode_obj [key_sec,VInt64 t.sec; key_usec,vint32 t.usec]
) (Time.gettimeofday())
);
"hrTime", vfun0 (fun() ->
Expand Down Expand Up @@ -2292,10 +2292,10 @@ let resource_fields = [
encode_array_a [|vfloat m1; vfloat m5; vfloat m15|];
);
"freeMemory", vfun0 (fun() ->
VUInt64 (Resource.free_memory())
encode_nullable (fun u -> VUInt64 u) (Resource.free_memory())
);
"totalMemory", vfun0 (fun() ->
VUInt64 (Resource.total_memory())
encode_nullable (fun u -> VUInt64 u) (Resource.total_memory())
);
"constrainedMemory", vfun0 (fun() ->
encode_nullable (fun u -> VUInt64 u) (Resource.constrained_memory())
Expand Down
2 changes: 1 addition & 1 deletion std/eval/luv/FsEvent.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum abstract FsEventFlag(Int) {
/**
Starts the handle and watches the given path for changes.
**/
public function start(path:NativeString, ?flags:Array<FsEventFlag>, callback:(result:Result<{file:NativeString,events:Array<FsEventType>}>)->Void):Void;
public function start(path:NativeString, ?flags:Array<FsEventFlag>, callback:(result:Result<{file:Null<NativeString>,events:Array<FsEventType>}>)->Void):Void;

/**
Stops the handle.
Expand Down
6 changes: 4 additions & 2 deletions std/eval/luv/Resource.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ extern class Resource {

/**
Evaluates to the amount of free memory, in bytes.
Returns `null` when unknown.
**/
static function freeMemory():UInt64;
static function freeMemory():Null<UInt64>;

/**
Evaluates to the total amount of memory, in bytes.
Returns `null` when unknown.
**/
static function totalMemory():UInt64;
static function totalMemory():Null<UInt64>;

/**
Gets the amount of memory available to the process (in bytes) based on
Expand Down
Loading