Changeset 13447


Ignore:
Timestamp:
09/26/12 11:25:03 (12 years ago)
Author:
jschierm
Message:

FIX: For python, modules must return all arguments, so add WriteData functions for null arguments.

Location:
issm/trunk-jpl/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp

    r13324 r13447  
    112112
    113113                *pdataref=mxCreateString(string);
     114}
     115/*}}}*/
     116/*FUNCTION WriteData(mxArray** pdataref){{{*/
     117void WriteData(mxArray** pdataref){
     118
     119                ;
     120
    114121}
    115122/*}}}*/
  • issm/trunk-jpl/src/c/matlab/io/matlabio.h

    r13353 r13447  
    2626void WriteData(mxArray** pdataref,double scalar);
    2727void WriteData(mxArray** pdataref,char* string);
     28void WriteData(mxArray** pdataref);
    2829void WriteData(mxArray** pdataref,BamgGeom* bamggeom);
    2930void WriteData(mxArray** pdataref,BamgMesh* bamgmesh);
  • issm/trunk-jpl/src/c/python/io/WritePythonData.cpp

    r13322 r13447  
    4545
    4646        PyTuple_SetItem(tuple, index, array);
     47}/*}}}*/
     48/*FUNCTION WriteData(PyObject* py_tuple,int index){{{*/
     49void WriteData(PyObject* py_tuple, int index){
     50       
     51        PyTuple_SetItem(py_tuple, index, Py_None);
     52
    4753}/*}}}*/
    4854
     
    128134}/*}}}*/
    129135/*FUNCTION WriteData(PyObject* py_tuple,int index,SeqVec<double>* vector){{{*/
    130 void WriteData(PyObject* tuple,int index,SeqVec<double>* vector){
     136void WriteData(PyObject* py_tuple,int index,SeqVec<double>* vector){
    131137       
    132138        int M;
     
    140146        array=PyArray_SimpleNewFromData(1,&dim,NPY_DOUBLE,buffer);
    141147       
    142         PyTuple_SetItem(tuple, index, array);
     148        PyTuple_SetItem(py_tuple, index, array);
    143149}
    144150/*}}}*/
  • issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp

    r13355 r13447  
    7373        if (strcmp(interptype,"node")==0){
    7474                WriteData(PLHS0,in_nod);
     75                WriteData(PLHS1);
    7576        }
    7677        else if (strcmp(interptype,"element")==0){
    7778                WriteData(PLHS0,in_elem);
     79                WriteData(PLHS1);
    7880        }
    7981        else if (strcmp(interptype,"element and node")==0){
Note: See TracChangeset for help on using the changeset viewer.