source: issm/oecreview/Archive/21724-22754/ISSM-22366-22367.diff

Last change on this file was 22755, checked in by Mathieu Morlighem, 7 years ago

CHG: added 21724-22754

File size: 1.2 KB
RevLine 
[22755]1Index: ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp
2===================================================================
3--- ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp (revision 22366)
4+++ ../trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp (revision 22367)
5@@ -845,10 +845,8 @@
6 }/*}}}*/
7 GenericOption<char*>* OptionCharParse( char* name, const mxArray* prhs[]){ /*{{{*/
8
9- GenericOption<char*> *ochar = NULL;
10-
11 /*check and parse the name */
12- ochar=new GenericOption<char*>();
13+ GenericOption<char*>* ochar=new GenericOption<char*>();
14 ochar->name =xNew<char>(strlen(name)+1);
15 memcpy(ochar->name,name,(strlen(name)+1)*sizeof(char));
16
17@@ -856,7 +854,13 @@
18 if (!mxIsClass(prhs[0],"char")){
19 _error_("Value of option \"" << ochar->name << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
20 }
21- FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
22+ //FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
23+ FetchData(&ochar->value,prhs[0]);
24+ ochar->numel = strlen(name);
25+ ochar->ndims = 2;
26+ ochar->size = xNew<int>(2);
27+ ochar->size[0] = ochar->numel;
28+ ochar->size[1] = 1;
29
30 return(ochar);
31 }/*}}}*/
Note: See TracBrowser for help on using the repository browser.