From 57c1686f68b81605430282c77a969ac48c9c5dd3 Mon Sep 17 00:00:00 2001 From: pierrebressy Date: Tue, 3 May 2022 14:14:34 +0200 Subject: [PATCH] Update perform_front_propagation_3d_mex.cpp undef the preprocess symbol add new prototype and implement function with correct types for : - mxCreateNumericArray, with Matlab 2021a. --- .../mex/perform_front_propagation_3d_mex.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/matlab/toolbox_graph/mex/perform_front_propagation_3d_mex.cpp b/matlab/toolbox_graph/mex/perform_front_propagation_3d_mex.cpp index 9612a8c8..062d18dc 100644 --- a/matlab/toolbox_graph/mex/perform_front_propagation_3d_mex.cpp +++ b/matlab/toolbox_graph/mex/perform_front_propagation_3d_mex.cpp @@ -20,6 +20,17 @@ #include "mex.h" + +// PBR - MKR 20220503 +// old prototype in /Applications/MATLAB_R2021b.app/extern/include/matrix.h +// LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericArray(mwSize ndim, const mwSize *dims, mxClassID classid, mxComplexity flag); +// type of param 2 not correct: old = const mwSize *dims new = const int dims[3] +#undef mxCreateNumericArray +LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray * mxCreateNumericArray(mwSize ndim, const int dims[3], mxClassID classid, mxComplexity flag); +LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray * mxCreateNumericArray(mwSize ndim, const int dims[3], mxClassID classid, mxComplexity flag){ + return mxCreateNumericArray_730(ndim,(const mwSize *)dims,classid,flag); +} + void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray*prhs[] ) { @@ -117,4 +128,4 @@ void mexFunction( int nlhs, mxArray *plhs[], GW_DELETEARRAY(Q); return; -} \ No newline at end of file +}