About my projects, examples and tutorials
NO_TITLE

NO_TITLE

Gnome::Glib::T-slist§

Class initialization§

new§

Initialization of a type class is simple and only needed when the standalone functions are used.

method new ( )
Code

Record N-SList§

class N-SList:auth<github:MARTIMM>:api<2> is export is repr('CStruct') {

  has gpointer $.data;
  has N-Object $.next;
}
Code
  • data; holds the element's data, which can be a pointer to any kind of data, or any integer value using the Type Conversion Macros
  • next; contains the link to the next element in the list.

Standalone Functions§

clear-slist§

Clears a pointer to a Gnome::Glib::T-slist, freeing it and, optionally, freeing its elements using $destroy. $slist-ptr must be a valid pointer. If $slist-ptr points to a null Gnome::Glib::T-slist, this does nothing.

method clear-slist ( N-SList() $slist-ptr, &destroy )
Code
  • $slist-ptr; a Gnome::Glib::T-slist return location.
  • &destroy; the function to pass to .free-full() or undefined to not free elements. Tthe function must be specified with following signature; :( gpointer $data ).