From: Dennis S. <sy...@yo...> - 2004-07-05 09:39:20
|
Sounds good, in which C file do you wish to add this ? Btw, did you have a look at the copyright banner I posted to the list ? Cheers, Dennis On Sun, 2004-07-04 at 20:00 -0300, Duilio Javier Protti wrote: > I was thinking about to include in the library a > Glib like macro to make request of memory initialized > to 0. It will fail if malloc returns NULL, showing an > useful message. Looks something like: > > void *visual_malloc0 (size_t nbytes); > > #define visual_new0(struct_type, n_structs) \ > ((struct_type *) visual_malloc0 (((size_t) sizeof (struct_type)) * > ((size_t) (n_structs)))) > > > This will let us require memory without checking > the return value and showing a message accordingly. > > People, what do you think? > > > Duilio. |