go-ph7/cgo.c

21 lines
686 B
C

#include "cgo.h"
int engine_config_err_log(ph7 *pEngine, const char **pzPtr, int *pLen) {
return ph7_config(pEngine, PH7_CONFIG_ERR_LOG, pzPtr, pLen);
}
int vm_extract_output(ph7_vm *pVm, const char **pzPtr, int *pLen) {
return ph7_vm_config(pVm, PH7_VM_CONFIG_EXTRACT_OUTPUT, pzPtr, pLen);
}
int vm_set_output_callback(ph7_vm *pVm, void *pUserData) {
return ph7_vm_config(pVm, PH7_VM_CONFIG_OUTPUT, &write_vm_output, pUserData);
}
int vm_create_function(ph7_vm *pVm, const char *zName, void *pUserData) {
return ph7_create_function(pVm, zName, call_foreign_function, pUserData);
}
int vm_config_err_report(ph7_vm *pVm) {
return ph7_vm_config(pVm, PH7_VM_CONFIG_ERR_REPORT);
}