Functions
Program Creation and Destruction Functions

Functions that set up programs, and destroy them. More...

Functions

EAPI Embryo_Program * embryo_program_new (void *data, int size)
 Creates a new Embryo program, with bytecode data that can be freed. More...
 
EAPI Embryo_Program * embryo_program_const_new (void *data, int size)
 Creates a new Embryo program, with bytecode data that cannot be freed. More...
 
EAPI Embryo_Program * embryo_program_load (const char *file)
 Creates a new Embryo program based on the bytecode data stored in the given file. More...
 
EAPI void embryo_program_free (Embryo_Program *ep)
 Frees the given Embryo program. More...
 

Detailed Description

Functions that set up programs, and destroy them.

Function Documentation

◆ embryo_program_new()

EAPI Embryo_Program * embryo_program_new ( void *  data,
int  size 
)

Creates a new Embryo program, with bytecode data that can be freed.

Parameters
dataPointer to the bytecode of the program.
sizeNumber of bytes of bytecode.
Returns
A new Embryo program.

Referenced by embryo_program_load().

◆ embryo_program_const_new()

EAPI Embryo_Program * embryo_program_const_new ( void *  data,
int  size 
)

Creates a new Embryo program, with bytecode data that cannot be freed.

Parameters
dataPointer to the bytecode of the program.
sizeNumber of bytes of bytecode.
Returns
A new Embryo program.

◆ embryo_program_load()

EAPI Embryo_Program * embryo_program_load ( const char *  file)

Creates a new Embryo program based on the bytecode data stored in the given file.

Parameters
fileFilename of the given file.
Returns
A new Embryo program.

References embryo_program_new(), and embryo_swap_32().

◆ embryo_program_free()

EAPI void embryo_program_free ( Embryo_Program *  ep)

Frees the given Embryo program.

Parameters
epThe given program.