|
|
@ -67,11 +67,11 @@ typedef void (*module_init_fn)(Context*);
|
|
|
|
int n_recv = 0;
|
|
|
|
int n_recv = 0;
|
|
|
|
char** n_recvd = nullptr;
|
|
|
|
char** n_recvd = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
__AQEXPORT__(void) wait_engine(){
|
|
|
|
__AQEXPORT__(void) wait_engine() {
|
|
|
|
PROMPT_ACQUIRE();
|
|
|
|
PROMPT_ACQUIRE();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
__AQEXPORT__(void) wake_engine(){
|
|
|
|
__AQEXPORT__(void) wake_engine() {
|
|
|
|
ENGINE_RELEASE();
|
|
|
|
ENGINE_RELEASE();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ have_hge() {
|
|
|
|
Context* _g_cxt;
|
|
|
|
Context* _g_cxt;
|
|
|
|
|
|
|
|
|
|
|
|
__AQEXPORT__(StoredProcedure)
|
|
|
|
__AQEXPORT__(StoredProcedure)
|
|
|
|
get_procedure_ex(const char* name){
|
|
|
|
get_procedure_ex(const char* name) {
|
|
|
|
return get_procedure(_g_cxt, name);
|
|
|
|
return get_procedure(_g_cxt, name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -134,13 +134,13 @@ void activate_callback_based_trigger(Context* context, const char* cmd)
|
|
|
|
|
|
|
|
|
|
|
|
// This function contains heap allocations, free after use
|
|
|
|
// This function contains heap allocations, free after use
|
|
|
|
template<class String_T>
|
|
|
|
template<class String_T>
|
|
|
|
char* to_lpstr(const String_T& str){
|
|
|
|
char* to_lpstr(const String_T& str) {
|
|
|
|
auto ret = static_cast<char*>(malloc(str.size() + 1));
|
|
|
|
auto ret = static_cast<char*>(malloc(str.size() + 1));
|
|
|
|
memcpy(ret, str.c_str(), str.size());
|
|
|
|
memcpy(ret, str.c_str(), str.size());
|
|
|
|
ret[str.size()] = '\0';
|
|
|
|
ret[str.size()] = '\0';
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char* copy_lpstr(const char* str){
|
|
|
|
char* copy_lpstr(const char* str) {
|
|
|
|
auto len = strlen(str);
|
|
|
|
auto len = strlen(str);
|
|
|
|
auto ret = static_cast<char*>(malloc(len + 1));
|
|
|
|
auto ret = static_cast<char*>(malloc(len + 1));
|
|
|
|
memcpy(ret, str, len + 1);
|
|
|
|
memcpy(ret, str, len + 1);
|
|
|
@ -639,7 +639,7 @@ extern "C" int __DLLEXPORT__ dllmain(int argc, char** argv) {
|
|
|
|
cxt->log("ready: %s\n", ready? "true":"false");
|
|
|
|
cxt->log("ready: %s\n", ready? "true":"false");
|
|
|
|
while (running) {
|
|
|
|
while (running) {
|
|
|
|
std::this_thread::sleep_for(1ms);
|
|
|
|
std::this_thread::sleep_for(1ms);
|
|
|
|
if(ready){
|
|
|
|
if(ready) {
|
|
|
|
cxt->log("running: %s\n", running? "true":"false");
|
|
|
|
cxt->log("running: %s\n", running? "true":"false");
|
|
|
|
cxt->log("ready: %s\n", ready? "true":"false");
|
|
|
|
cxt->log("ready: %s\n", ready? "true":"false");
|
|
|
|
void* handle = dlopen("./dll.so", RTLD_NOW);
|
|
|
|
void* handle = dlopen("./dll.so", RTLD_NOW);
|
|
|
|