[m-rev.] for review: document assumptions about argv and stand-alone interfaces

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jun 9 16:41:02 AEST 2011


For review by anyone.

Branches: main

doc/user_guide.texi:
 	Mention that stand-alone interface clients should not modify
 	the argument vector after the runtime has been initialised.

Julien.

Index: user_guide.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.629
diff -u -r1.629 user_guide.texi
--- user_guide.texi	24 May 2011 09:14:10 -0000	1.629
+++ user_guide.texi	9 Jun 2011 06:37:39 -0000
@@ -10670,6 +10670,9 @@
  some garbage collectors rely upon this.
  (This is why the type of the dummy variable in the above example is
  @code{void *}.)
+Note that modifying the argument vector, @var{argv}, after the Mercury runtime
+has been initialised will result in undefined behaviour since the runtime
+maintains a reference into @var{argv}.

  @sp 1
  @item @bullet{} @code{mercury_terminate()}

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list