2022-11-25 07:56:56 +00:00
|
|
|
#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);
|
|
|
|
}
|
2022-11-27 04:45:16 +00:00
|
|
|
|
|
|
|
int vm_create_function(ph7_vm *pVm, const char *zName, void *pUserData) {
|
|
|
|
return ph7_create_function(pVm, zName, call_foreign_function, pUserData);
|
|
|
|
}
|
2022-11-28 00:10:28 +00:00
|
|
|
|
|
|
|
int vm_config_err_report(ph7_vm *pVm) {
|
|
|
|
return ph7_vm_config(pVm, PH7_VM_CONFIG_ERR_REPORT);
|
2022-11-28 04:49:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int vm_output_length(ph7_vm *pVm, unsigned int *pLength) {
|
|
|
|
return ph7_vm_config(pVm, PH7_VM_OUTPUT_LENGTH, pLength);
|
|
|
|
}
|