Changeset 22367


Ignore:
Timestamp:
01/26/18 13:34:30 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixing options fetching char*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp

    r22076 r22367  
    846846GenericOption<char*>* OptionCharParse( char* name, const mxArray* prhs[]){ /*{{{*/
    847847
    848         GenericOption<char*>  *ochar = NULL;
    849 
    850848        /*check and parse the name  */
    851         ochar=new GenericOption<char*>();
     849        GenericOption<char*>* ochar=new GenericOption<char*>();
    852850        ochar->name =xNew<char>(strlen(name)+1);
    853851        memcpy(ochar->name,name,(strlen(name)+1)*sizeof(char));
     
    857855                _error_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    858856        }
    859         FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
     857        //FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
     858        FetchData(&ochar->value,prhs[0]);
     859        ochar->numel = strlen(name);
     860        ochar->ndims = 2;
     861        ochar->size = xNew<int>(2);
     862        ochar->size[0] = ochar->numel;
     863        ochar->size[1] = 1;
    860864
    861865        return(ochar);
Note: See TracChangeset for help on using the changeset viewer.