summaryrefslogtreecommitdiff
path: root/otherlibs/win32unix/unixsupport.c
diff options
context:
space:
mode:
authoryallop <yallop@gmail.com>2017-08-03 14:19:13 +0100
committerMark Shinwell <mshinwell@gmail.com>2017-08-03 14:19:13 +0100
commit65c932253b96651a6d13550a48dd386a89244ed0 (patch)
treee06098840d29e15d888c28e7c40238743cb65f7a /otherlibs/win32unix/unixsupport.c
parent3d1a0fba2f64ad82bc3961311d85d8b7f6c48f06 (diff)
downloadocaml-65c932253b96651a6d13550a48dd386a89244ed0.tar.gz
String_val: return 'const char *' when -safe-string is globally enabled (#1274)
Diffstat (limited to 'otherlibs/win32unix/unixsupport.c')
-rw-r--r--otherlibs/win32unix/unixsupport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/win32unix/unixsupport.c b/otherlibs/win32unix/unixsupport.c
index ced62fd821..4ed2383b3b 100644
--- a/otherlibs/win32unix/unixsupport.c
+++ b/otherlibs/win32unix/unixsupport.c
@@ -280,7 +280,7 @@ value unix_error_of_code (int errcode)
return err;
}
-void unix_error(int errcode, char *cmdname, value cmdarg)
+void unix_error(int errcode, const char *cmdname, value cmdarg)
{
value res;
value name = Val_unit, err = Val_unit, arg = Val_unit;
@@ -305,12 +305,12 @@ void unix_error(int errcode, char *cmdname, value cmdarg)
caml_raise(res);
}
-void uerror(char * cmdname, value cmdarg)
+void uerror(const char * cmdname, value cmdarg)
{
unix_error(errno, cmdname, cmdarg);
}
-void caml_unix_check_path(value path, char * cmdname)
+void caml_unix_check_path(value path, const char * cmdname)
{
if (! caml_string_is_c_safe(path)) unix_error(ENOENT, cmdname, path);
}