Re: idea: g_alloca_printf



Hi Stefan,

On Fri, 26 Aug 2005 02:42:00 +0900, Stefan Kost wrote:
...
> The idea now is to wrap it all in a macro (needs to be a macro, as alloca 
> only work localy). In the end I'd like to do:
> 
> g_object_set(G_OBJECT(self),
>     "status",g_alloca_printf(_("Loading file \"%s\""),file_name),
>     NULL);
...
> Any ideas folks?

You probably want
	http://cvs.jankratochvil.net/viewcvs/captive/src/libcaptive/include/captive/macros.h?rev=HEAD
	-> captive_printf_alloca(format,args...)

There are many other handy macros permitting syntax like:
	some_struct_t *struct_pointer;
	captive_new(struct_pointer);

without duplicating any information like the types if using just g_new().


Regards,
Lace



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