Skip to content

Commit 626c867

Browse files
committed
minor tweak of stubs
1 parent 94eacdf commit 626c867

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

jscomp/stubs/ext_basic_hash_stubs.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,17 @@ CAMLprim value caml_stale_file(value path)
159159
{
160160
CAMLparam1(path);
161161
struct timeval tv[2];
162-
char * p = caml_stat_strdup(String_val(path));
162+
char * p = caml_stat_strdup_to_os(String_val(path));
163+
// unicode friendly
163164
tv[0].tv_sec = 0.0;
164165
tv[0].tv_usec = 0.0;
165166
tv[1].tv_sec = 0.0;
166167
tv[1].tv_usec = 0.0;
167-
caml_enter_blocking_section();
168+
// caml_enter_blocking_section();
169+
// not needed for single thread
168170
utimes(p, tv);
169-
caml_leave_blocking_section();
171+
// caml_leave_blocking_section();
172+
// not needed for single thread
170173
caml_stat_free(p);
171174
// TODO: error checking
172175
CAMLreturn(Val_unit);

0 commit comments

Comments
 (0)