[m-rev.] diff: fix dir.m bugs

Simon Taylor stayl at cs.mu.OZ.AU
Mon Aug 4 18:21:45 AEST 2003



Estimated hours taken: 0.1
Branches: main

library/dir.m:
	Fix `may_call_call_mercury'/`will_not_call_mercury' bugs.

Index: dir.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/dir.m,v
retrieving revision 1.18
diff -u -u -r1.18 dir.m
--- dir.m	24 Jul 2003 03:02:29 -0000	1.18
+++ dir.m	4 Aug 2003 08:10:21 -0000
@@ -418,7 +418,7 @@
 % system-dependent manner.
 :- pragma foreign_proc("C#",
 	dir__split_name_dotnet(FileName::in, DirName::out, BaseName::out),
-	[may_call_mercury, promise_pure, thread_safe],
+	[will_not_call_mercury, promise_pure, thread_safe],
 "
 	try {
 		DirName = System.IO.Path.GetDirectoryName(FileName);
@@ -786,7 +786,7 @@
 :- pragma foreign_proc("C#",
 	dir__make_directory(DirName::in, Res::out,
 			_IO0::di, _IO::uo),
-	[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
+	[may_call_mercury, promise_pure, tabled_for_io, thread_safe],
 "{
     try {
         // CreateDirectory doesn't fail if a file with the same
@@ -821,8 +821,9 @@
 	SUCCESS_INDICATOR = MR_FALSE;
 #endif
 ").
-:- pragma foreign_proc("C#", can_implement_make_directory,
-		[will_not_call_mercury, promise_pure, thread_safe],
+:- pragma foreign_proc("C#",
+	can_implement_make_directory,
+	[will_not_call_mercury, promise_pure, thread_safe],
 	"SUCCESS_INDICATOR = true;"
 ).
 
@@ -835,7 +836,7 @@
 :- pragma foreign_proc("C",
 	dir__make_single_directory_2(ErrorIfExists::in, DirName::in,
 		Result::out, IO0::di, IO::uo),
-	[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
+	[may_call_mercury, promise_pure, tabled_for_io, thread_safe],
 "{
 #if defined(MR_WIN32)
 	if (CreateDirectory(DirName, NULL)) {
@@ -869,7 +870,7 @@
 :- pragma foreign_proc("C#",
 	dir__make_single_directory_2(ErrorIfExists::in, DirName::in,
 		Result::out, _IO0::di, _IO::uo),
-	[will_not_call_mercury, promise_pure, tabled_for_io, thread_safe],
+	[may_call_mercury, promise_pure, tabled_for_io, thread_safe],
 "{
     try {
 	// CreateDirectory doesn't fail if a file with the same
@@ -1166,8 +1167,9 @@
 :- pred can_implement_dir_foldl is semidet.
 
 can_implement_dir_foldl :- semidet_fail.
-:- pragma foreign_proc("C", can_implement_dir_foldl,
-		[will_not_call_mercury, promise_pure, thread_safe],
+:- pragma foreign_proc("C",
+	can_implement_dir_foldl,
+	[will_not_call_mercury, promise_pure, thread_safe],
 "
 #if defined(MR_HAVE_OPENDIR) && defined(MR_HAVE_READDIR) && \\
 		defined(MR_HAVE_CLOSEDIR)
@@ -1365,7 +1367,7 @@
 "dir.copy_c_string should only be called by code generated by C backends").
 :- pragma foreign_proc("C",
 	copy_c_string(Ptr::in) = (Str::out),
-	[promise_pure, will_not_call_mercury, thread_safe],
+	[will_not_call_mercury, promise_pure, thread_safe],
 	"MR_make_aligned_string_copy(Str, (char *) Ptr);").
 

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list