Re: Varargs type stringification (#50972)



On Sun, Apr 01, 2001 at 12:23:34AM +0200, Tim Janik wrote:
...
> a good while back i already spent a couple thoughts on getting around
> the need to free certain temporary values (mostly strings) and how to
> provide a suitable g_alloca() implementation for systems where we can't
> use native alloca() for whatever reasons.

Yes, alloca() is IMO really the only valid way how to solve problem of
g_stringify_type().

> i think the best approach for both is a stack-level dependant allocator
> that's undergoing frequent release cycles triggered by the main loop.

Although I can see "galloca.h" in "glib" which tries to find existing alloca()
on current system by various ways,  I just don't see some alloca()
implementation when just NO alloca() can be found. Why isn't such
implementation included and also publically exported in <glib.h>?

IMO there isn't anything to technically solve about the implementation as it is
already written and it is successfuly used from the ancient days. It can found
for example at:
			gcc-x.y.z/libiberty/alloca.c
/* (Mostly) portable public-domain implementation -- D A Gwyn */

It just needs to be added to glib - or I'm missing something?


							Lace




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