double* data = malloc(sizeof(double));
*data = gens[i + 1]->number;
ptr = data;
+ } else if(strcmp(info->argtypes[i + 1], "byte") == 0) {
+ char* data = malloc(sizeof(char));
+ *data = gens[i + 1]->number;
+ ptr = data;
} else if(strcmp(info->argtypes[i + 1], "string") == 0) {
char** data = malloc(sizeof(char*));
*data = malloc(gens[i + 1]->string_length + 1);
} else if(strcmp(info->argtypes[0], "integer") == 0) {
gen->type = SN_TYPE_DOUBLE;
gen->number = *(int*)&result;
+ } else if(strcmp(info->argtypes[0], "byte") == 0) {
+ gen->type = SN_TYPE_DOUBLE;
+ gen->number = *(char*)&result;
} else if(strcmp(info->argtypes[0], "string") == 0) {
gen->type = SN_TYPE_STRING;
gen->string = sn_strdup(*(char**)&result);
assign = &ffi_type_double;
} else if(strcmp(typ, "string") == 0) {
assign = &ffi_type_pointer;
+ } else if(strcmp(typ, "byte") == 0) {
+ assign = &ffi_type_schar;
}
info->argtypes[i - 2] = typ;