summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/windir.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>1997-05-26 17:16:31 +0000
committerDamien Doligez <damien.doligez-inria.fr>1997-05-26 17:16:31 +0000
commit8555ce8fe79fbf54924845a608054306733eeeba (patch)
treedd5b22190a08dcf3c1d8c16adc89988b60d982f1 /otherlibs/win32unix/windir.c
parentff13e60cd68933428c60c10680c82c3cd91ea8c2 (diff)
Changement de Push/Pop_roots en Begin/End_roots
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1572 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/windir.c')
-rw-r--r--otherlibs/win32unix/windir.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/otherlibs/win32unix/windir.c b/otherlibs/win32unix/windir.c
index 0461c1e34..7009febeb 100644
--- a/otherlibs/win32unix/windir.c
+++ b/otherlibs/win32unix/windir.c
@@ -23,22 +23,21 @@ value win_findfirst(name) /* ML */
int h;
value v;
struct _finddata_t fileinfo;
- Push_roots(r,1);
-
-#define valname r[0]
-
- h = _findfirst(String_val(name),&fileinfo);
- if (h == -1) {
- if (errno == ENOENT)
- raise_end_of_file();
- else
- uerror("opendir", Nothing);
- }
- valname = copy_string(fileinfo.name);
- v = alloc_tuple(2);
- Field(v,0) = valname;
- Field(v,1) = Val_int(h);
- Pop_roots();
+ value valname = Val_unit;
+
+ Begin_root (valname);
+ h = _findfirst(String_val(name),&fileinfo);
+ if (h == -1) {
+ if (errno == ENOENT)
+ raise_end_of_file();
+ else
+ uerror("opendir", Nothing);
+ }
+ valname = copy_string(fileinfo.name);
+ v = alloc_tuple(2);
+ Field(v,0) = valname;
+ Field(v,1) = Val_int(h);
+ End_roots();
return v;
}