data set/get

SVN revision: 9486
This commit is contained in:
Carsten Haitzler 2004-03-26 08:07:47 +00:00
parent 8e4af28c5b
commit 76b6621bba
3 changed files with 18 additions and 0 deletions

View File

@ -73,6 +73,8 @@ extern "C" {
Embryo_Cell embryo_program_variable_find(Embryo_Program *ep, char *name);
void embryo_program_error_set(Embryo_Program *ep, int error);
int embryo_program_error_get(Embryo_Program *ep);
void embryo_program_data_set(Embryo_Program *ep, void *data);
void *embryo_program_data_get(Embryo_Program *ep);
const char *embryo_error_string_get(int error);
int embryo_data_string_length_get(Embryo_Program *ep, Embryo_Cell *str_cell);
void embryo_data_string_get(Embryo_Program *ep, Embryo_Cell *str_cell, char *dst);

View File

@ -479,6 +479,20 @@ embryo_program_error_get(Embryo_Program *ep)
return ep->error;
}
void
embryo_program_data_set(Embryo_Program *ep, void *data)
{
if (!ep) return;
ep->data = data;
}
void *
embryo_program_data_get(Embryo_Program *ep)
{
if (!ep) return NULL;
return ep->data;
}
const char *
embryo_error_string_get(int error)
{

View File

@ -244,6 +244,8 @@ struct _Embryo_Program
int params_alloc;
int run_count;
void *data;
};
struct _Embryo_Func_Stub