Exemplo n.º 1
0
int main ()
{
    int local = 5;
    allocPointer();
    allocPointer();
    allocPointer();
    allocPointer();
    
    return 0;
}
Exemplo n.º 2
0
SciErr createPointer(void* _pvCtx, int _iVar, void* _pvPtr)
{
	SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
	void* pvPtr		= NULL;

	sciErr = allocPointer(_pvCtx, _iVar, &pvPtr);
	if(sciErr.iErr)
	{
		addErrorMessage(&sciErr, API_ERROR_CREATE_POINTER, _("%s: Unable to create variable in Scilab memory"), "createPointer");
		return sciErr;
	}

	((double*)pvPtr)[0] = (double) ((unsigned long int)_pvPtr);

	return sciErr;
}