[m-dev.] for review: document dl__close caveats
Adrian Pellas-Rice
apell at students.cs.mu.oz.au
Tue Feb 6 23:06:41 AEDT 2001
[Fergus wrote:]
> > > On the other hand, the fact that copy/2 won't work is perhaps a good
> > > reason to document it.
> >
> > Yes. It is at least worth mentioning that "copy/2 will not work in some
> > cases."
> >
>
> OK, how about this?
That's what I was hoping for.
> browser/dl.m:
> Mention the danger of trying to use builtin__copy
> as a solution to the dangers of dl__close.
>
> Workspace: /home/hg/fjh/mercury
> Index: browser/dl.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/browser/dl.m,v
> retrieving revision 1.5.4.2
> diff -u -d -r1.5.4.2 dl.m
> --- browser/dl.m 2001/02/06 09:14:15 1.5.4.2
> +++ browser/dl.m 2001/02/06 09:25:42
> @@ -71,6 +71,9 @@
> % any references to types or instances defined in the dynamically loaded
> % module, as might be the case if you're using existentially quantified
> % data types, since they too can contain references to static data.
> +%
> +% (Note that using builtin__copy/2, to make copies rather than
> +% keeping references, is *not* guaranteed to work in all cases.)
> %
> :- pred dl__close(handle::in, dl__result::out,
> io__state::di, io__state::uo) is det.
Adrian Pellas-Rice
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list