Xmlb.Stack

Fields

None

Methods

pop ()

push ()

to_string ()

Details

class Xmlb.Stack
pop()
Raises:

GLib.Error

Returns:

True if popping succeeded, False if the stack was empty already

opcode_out:

return location for the popped Xmlb.Opcode

Return type:

(bool, opcode_out: Xmlb.Opcode)

Pops an opcode off the stack.

New in version 0.2.0.

push()
Raises:

GLib.Error

Returns:

True if a new empty opcode was returned, or False if the stack has reached its maximum size

opcode_out:

return location for the new Xmlb.Opcode

Return type:

(bool, opcode_out: Xmlb.Opcode or None)

Pushes a new empty opcode onto the end of the stack. A pointer to the opcode is returned in opcode_out so that the caller can initialise it. This must be done before the stack is next used as, for performance reasons, the newly pushed opcode is not zero-initialised.

New in version 0.2.0.

to_string()
Returns:

text

Return type:

str

Returns a string representing a stack.

New in version 0.1.4.