Program::~Program() { for (ArrayList::Iterator it = allFuncs.iterator(); !it.end(); it.next()) delete reinterpret_cast<Function *>(it.get()); for (ArrayList::Iterator it = allRValues.iterator(); !it.end(); it.next()) releaseValue(reinterpret_cast<Value *>(it.get())); }
int ServeIndex(HttpContextRef context, char* index_name) { RAWLOG_INFO("Calling ruby framework to serve index"); VALUE val = callServeIndex(index_name); char* res = getStringFromValue(val); if (res) { RAWTRACE("RESPONSE:"); RAWTRACE_DATA((UInt8*)res, strlen(res)); RAWTRACE("RESPONSE -- eof --"); RAWTRACE("Add response to the send buffer"); CFDataAppendBytes(context->_sendBytes, (UInt8*)res, (CFIndex)strlen(res)); releaseValue(val); return 1; } return 0; }
int ServeIndex(HttpContextRef context, char* index_name) { DBG(("Calling ruby framework to serve index\n")); VALUE val = callServeIndex(index_name); char* res = getStringFromValue(val); if (res) { DBG(("RESPONSE:\n")); _dbg_print_data((UInt8*)res, strlen(res)); DBG(("-- eof --\n")); DBG(("Add response to the send buffer")) CFDataAppendBytes(context->_sendBytes, (UInt8*)res, (CFIndex)strlen(res)); releaseValue(val); return 1; } return 0; }
static int _CallApplication(HttpContextRef context, RouteRef route) { RAWLOG_INFO("Calling ruby framework"); VALUE val = callFramework(_CreateRequestHash(context,route)); char* res = getStringFromValue(val); if (res) { RAWTRACE("RESPONSE:"); RAWTRACE_DATA((UInt8*)res, strlen(res)); RAWTRACE( "RESPONSE -- eof --"); RAWTRACE("Add response to the send buffer"); CFDataAppendBytes(context->_sendBytes, (UInt8*)res, (CFIndex)strlen(res)); releaseValue(val); return 1; } return 0; }
static int _CallApplication(HttpContextRef context, RouteRef route) { DBG(("Calling ruby framework\n")); VALUE val = callFramework(_CreateRequestHash(context,route)); char* res = getStringFromValue(val); if (res) { DBG(("RESPONSE:\n")); _dbg_print_data((UInt8*)res, strlen(res)); DBG(("-- eof --\n")); DBG(("Add response to the send buffer")) CFDataAppendBytes(context->_sendBytes, (UInt8*)res, (CFIndex)strlen(res)); releaseValue(val); return 1; } return 0; }
void NSValue::setValue(void* value, NSValueType type) { releaseValue(); m_value = value; m_type = type; }
NSValue::~NSValue() { releaseValue(); }