void KPR_host_trace(xsMachine* the) { KprHost self = xsGetHostData(xsThis); KprApplication application = (KprApplication)self->first; xsStringValue text = xsToString(xsArg(0)); xsBeginHost(application->the); { xsTrace(text); } xsEndHost(application->the); }
void KPR_message_set_responseChunk(xsMachine* the) { KprMessage self = xsGetHostData(xsThis); xsTrace("message.responseChunk deprecated, use responseBuffer\n"); if (xsTest(xsArg(0))) { void* data = xsGetHostData(xsArg(0)); xsIntegerValue size = xsToInteger(xsGet(xsArg(0), xsID_length)); xsThrowIfFskErr(KprMessageSetResponseBody(self, data, size)); } else xsThrowIfFskErr(KprMessageSetResponseBody(self, NULL, 0)); }
/** * 重内存并清除原分配地址,记录新分配调用发生的地址 */ void *xsReAllocDebug(void *pointer, size_t size, const char *file, int line) { void *p = xsReAllocNative(pointer, size); if (p == NULL) { xsTrace("Calloc failed. size: %d, file: %s, line: %d", size, file, line); xsAssert("Calloc failed", file, line); } AddMemInfoItem(p, size, file, line); return p; }
void xsCoreApplication::trace(const char *info) { xsTrace("[Script::Trace] %s", info); }