static tp_obj zzpy__pyDFMenu_help(TP) { PythonEngine *engine = (PythonEngine*)tp_get(tp, tp->builtins, tp_string("userdata")).data.val; engine->callEventHandlers(IScriptEngine::Information, NULL, -1, "addItem(str)\n"); return tp_None; };
Engine* PythonEngine::clone() const { PythonEngine* engine = new PythonEngine(parent()); engine->setAlias(alias()); engine->setEnabled(isEnabled()); return engine; }
void pyPrintf(tp_vm *vm, const char *fmt, ...) { PythonEngine *engine = (PythonEngine*)tp_get(vm, vm->builtins, tp_string("userdata")).data.val; static char print_buffer[1024]; va_list list; va_start(list, fmt); vsnprintf(print_buffer, 1023, fmt, list); va_end(list); print_buffer[1023] = 0; // ensure the string is terminated engine->callEventHandlers(IScriptEngine::Information, NULL, -1, print_buffer); }