libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:


From: Gary V . Vaughan
Subject: Re:
Date: Wed, 31 Mar 2004 23:50:12 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bob!

On 31 Mar 2004, at 18:11, Bob Friesenhahn wrote:
On Wed, 31 Mar 2004, Gary V. Vaughan wrote:
Okay to commit?

This addresses the memory management problems in libltdl brought
to light by the kaffe people.

The style of this change confuses me, and it doesn't seem to do
exactly the same thing:

   /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory.  */
   if (!argz_len)
-    LT_DLFREE (argz);
+    argz = (free (argz), (char *) 0);

Actually, they are exactly the same after cpp is done!

The change of lt_ functions to 'x' versions (e.g. xmalloc)
implies that it is intended that these functions be moved out of
ltdl.c and into another source module.

When I wrote it, I had hoped to migrate to gnulib xmalloc with my next
patch... after todays discussions that ain't gonna happen.

If so, the 'x' versions may
then conflict with other 'x' versions used by the dependent program.
It seems better to retain the lt_ prefix because then the origin of
the functions is more clear and there is no danger of conflict.

Gnu programmers are used to the xmalloc api, and it is reimplemented all
over the place, and lowers the barrier for contributing, so I'm inclined
to reuse the idiom if possible.  When it comes to splitting out xalloc
functions, we can leave them static and #include "xalloc.c" into ltdl.c.
Eventually I'd like there to be enough sanity in libltdl source that
someone with a reasonable familiarity with the GNU programming style and
idioms could get to grips with ltdl.c in a few hours... the first step
is eliminating as much macro noise, and not-invented-here-isms as I can.

Cheers,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFAa0soFRMICSmD1gYRArRdAJ94fwqlSLebllIW46OT7X9enSXluwCfTjpb
9MIum7pqln4mDB9HRngeFkc=
=Cl+3
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]