示例#1
0
文件: nv50_ir.cpp 项目: dumbbell/mesa
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()));
}
示例#2
0
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;	
}
示例#3
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;	
}
示例#4
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;
}
示例#5
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;
}
示例#6
0
void NSValue::setValue(void* value, NSValueType type) {
	releaseValue();
	m_value = value;
	m_type = type;
}
示例#7
0
NSValue::~NSValue() {
	releaseValue();
}