Re: [Q] Usage of g_new and g_new0 function...



On Fri, 21 Jul 2000, Woo-Sick Choi wrote:

> Hi~
> 
> I want to know Usage of g_new function.
> 
> I found g_new function in gtk/*.h and in Manual.
> But, I can't find any document for g_new.
> 
> pls Help me.
> 
> for exam)
> 
> table = g_new0(Table,1)
> 
> What this mean??
> 

 The Reference Documentation Project contains description of functions and
macros in glib, here is an documentaton for g_new and g_new0

   #define     g_new(type, count)

   Allocates count elements of type type. The returned pointer is cast to
   a pointer to the given type. If count is 0 it returns NULL.

   type : the type of the elements to allocate.
   count : the number of elements to allocate.
   Returns  :  a  pointer  to  the allocated memory, cast to a pointer to
   type.


   #define     g_new0(type, count)

   Allocates  count  elements  of  type type, initialized to 0's. The re-
   turned  pointer  is cast to a pointer to the given type. If count is 0
   it returns NULL.

   type : the type of the elements to allocate.
   count : the number of elements to allocate.
   Returns  :  a  pointer  to  the allocated memory, cast to a pointer to
   type.

> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

 Best regards,
  -Vlad





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