Dazzle.Ring

Fields

Name

Type

Access

Description

data

int

r/w

len

int

r/w

pos

int

r/w

Methods

class

sized_new (element_size, reserved_size, element_destroy)

append_vals (data, len)

foreach (func, *user_data)

ref ()

unref ()

Details

class Dazzle.Ring
classmethod sized_new(element_size, reserved_size, element_destroy)
Parameters:
  • element_size (int) – The size per element.

  • reserved_size (int) – The number of elements to allocate.

  • element_destroy (GLib.DestroyNotify) – Notification called when removing an element.

Returns:

A new Dazzle.Ring.

Return type:

Dazzle.Ring

Creates a new instance of Dazzle.Ring with the given number of elements.

append_vals(data, len)
Parameters:
  • data (object or None) – A pointer to the array of values.

  • len (int) – The number of values.

Returns:

the index of the first item.

Return type:

int

Appends len values located at data.

foreach(func, *user_data)
Parameters:

Calls func for every item in the Dazzle.Ring starting from the most recently inserted element to the least recently inserted.

ref()
Returns:

The self pointer.

Return type:

Dazzle.Ring

Atomically increments the reference count of self by one.

unref()

Atomically decrements the reference count of self by one. When the reference count reaches zero, the structure is freed.