Пример #1
0
S32 LLScriptHeapRunTime::catStrings(S32 address1, S32 address2)
{
	if (!mBuffer)
		return 0;

	S32 dataaddress1 = address1 + 2*LSCRIPTDataSize[LST_INTEGER] + 1;
	S32 dataaddress2 = address2 + 2*LSCRIPTDataSize[LST_INTEGER] + 1;

	S32 toffset1 = dataaddress1;
	safe_heap_bytestream_count_char(mBuffer, toffset1);

	S32 toffset2 = dataaddress2;
	safe_heap_bytestream_count_char(mBuffer, toffset2);

	// calculate new string size
	S32 size1 = toffset1 - dataaddress1;
	S32 size2 = toffset2 - dataaddress2;
	S32 newbuffer = size1 + size2 - 1;

	char *temp = new char[newbuffer];

	// get the strings
	bytestream2char(temp, mBuffer, dataaddress1);
	bytestream2char(temp + size1 - 1, mBuffer, dataaddress2);

	decreaseRefCount(address1);
	decreaseRefCount(address2);

	S32 retaddress = addData(temp);

	return retaddress;
}
Пример #2
0
// if we're going to assign a variable, we need to decrement the reference count of what we were pointing at (if anything)
void LLScriptHeapRunTime::releaseLocal(S32 address)
{
	S32 hr = get_register(mBuffer, LREG_HR);
	address = lscript_local_get(mBuffer, address);
	if (  (address >= hr)
		&&(address < hr + get_register(mBuffer, LREG_HP)))
	{
		decreaseRefCount(address);
	}
}
Пример #3
0
void LLScriptHeapRunTime::releaseGlobal(S32 address)
{
	// NOTA BENE: Global strings are referenced relative to the HR while local strings aren't
	S32 hr = get_register(mBuffer, LREG_HR);
	address = lscript_global_get(mBuffer, address) + hr;
	if (  (address >= hr)
		&&(address <  hr + get_register(mBuffer, LREG_HP)))
	{
		decreaseRefCount(address);
	}
}
Пример #4
0
void ConnectionPageWizard::queryExecTaskCompleted(const QString &/*taskName*/)
{
    decreaseRefCount();
}