Commit ba3ced9c authored by michel's avatar michel
Browse files

mex/source/simulate: changed some cast to (long int) for compatibility with x64


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1680 ac1d8469-bf42-47a9-8791-bf33cf982152
parent c0c56b6d
......@@ -1141,7 +1141,7 @@ Interpreter::compute_blocks(string file_name, string bin_basename)
mexPrintf("FBEGINBLOCK\n");
mexEvalString("drawnow;");
#endif
lBlock.begin=get_code_pos-int(Init_Code);
lBlock.begin=get_code_pos-(long int)(Init_Code);
#ifdef DEBUGC
mexPrintf("Block[Block_Count].begin=%d\n",lBlock.begin);
mexEvalString("drawnow;");
......@@ -1194,7 +1194,7 @@ Interpreter::compute_blocks(string file_name, string bin_basename)
T=(double*)mxMalloc(var*(periods+y_kmin+y_kmax)*sizeof(double));
break;
default :
mexPrintf("Unknow command : %d at pos %d !!\n",int(code),int(get_code_pos)-int(Init_Code));
mexPrintf("Unknow command : %d at pos %d !!\n",(long int)(code),(long int)(get_code_pos)-(long int)(Init_Code));
mexEvalString("st=fclose('all');clear all;");
mexEvalString("drawnow;");
mexErrMsgTxt("End of simulate");
......
......@@ -43,7 +43,7 @@ typedef struct Block_contain_type
typedef struct Block_type
{
int begin, end, size, type;
long int begin, end, size, type;
};
#define pow_ pow
......@@ -52,7 +52,7 @@ typedef struct Block_type
#define get_code_pdouble (double*)Code; Code+=sizeof(double);
#define get_code_bool *((bool*)(Code++))
#define get_code_char *((char*)(Code++))
#define get_code_pos (int)Code
#define get_code_pos (long int)Code
#define get_code_pointer Code
#define set_code_pointer(pos) Code=pos
......
......@@ -116,7 +116,7 @@ Mem_Mngr::mxFree_NZE(void* pos)
mexPrintf("NZE_Mem_add[i*CHUNK_BLCK_SIZE]=%d\n",NZE_Mem_add[i*CHUNK_BLCK_SIZE]);
mexEvalString("drawnow;");
}*/
gap=(int(pos)-int(NZE_Mem_add[i*CHUNK_BLCK_SIZE]))/sizeof(NonZeroElem);
gap=((long int)(pos)-(long int)(NZE_Mem_add[i*CHUNK_BLCK_SIZE]))/sizeof(NonZeroElem);
if ((gap<CHUNK_BLCK_SIZE) && (gap>=0))
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment