Commit e60c048c authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Do not overload pythons internal function print, use sinfo instead

parent 43a0ba80
......@@ -24,7 +24,7 @@ int main() {
std::cout << "first grid:" << info.grids[0].size << std::endl;
std::cout << "#===============================" << std::endl;
varno = 2;
info.variables[varno].print();
info.variables[varno].sinfo();
var = info.variables[varno];
std::cout << "#===============================" << std::endl;
std::cout << "Gridname:%s" << std::endl;
......
......@@ -164,7 +164,7 @@ CdiVariable::CdiVariable(int streamid,int vlistid, int varid) {
CdiVariable::~CdiVariable(){ size = -1; }
void
CdiVariable::print() { std::cout << name << " (" << longname << ")|units: " << units << "|size:"<< size << std::endl; }
CdiVariable::sinfo() { std::cout << name << " (" << longname << ")|units: " << units << "|size:"<< size << std::endl; }
void
CdiVariable::readField()
......
......@@ -73,7 +73,7 @@ class CdiVariable {
CdiZaxis zaxis;
CdiTaxis taxis;
void print();
void sinfo();
void readField();
void readFieldWithLevel(int tsID = 0);
void readFieldF();
......
......@@ -748,7 +748,7 @@ class CdiVariable(_object):
__swig_setmethods__["taxis"] = _CdiObj.CdiVariable_taxis_set
__swig_getmethods__["taxis"] = _CdiObj.CdiVariable_taxis_get
if _newclass:taxis = _swig_property(_CdiObj.CdiVariable_taxis_get, _CdiObj.CdiVariable_taxis_set)
def _print(self): return _CdiObj.CdiVariable__print(self)
def sinfo(self): return _CdiObj.CdiVariable_sinfo(self)
def readField(self): return _CdiObj.CdiVariable_readField(self)
def readFieldWithLevel(self, tsID = 0): return _CdiObj.CdiVariable_readFieldWithLevel(self, tsID)
def readFieldF(self): return _CdiObj.CdiVariable_readFieldF(self)
......
......@@ -21855,20 +21855,20 @@ fail:
}
 
 
SWIGINTERN PyObject *_wrap_CdiVariable__print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_CdiVariable_sinfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
CdiVariable *arg1 = (CdiVariable *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:CdiVariable__print",&obj0)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"O:CdiVariable_sinfo",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable__print" "', argument " "1"" of type '" "CdiVariable *""'");
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CdiVariable_sinfo" "', argument " "1"" of type '" "CdiVariable *""'");
}
arg1 = reinterpret_cast< CdiVariable * >(argp1);
(arg1)->print();
(arg1)->sinfo();
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -23353,7 +23353,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"CdiVariable_zaxis_get", _wrap_CdiVariable_zaxis_get, METH_VARARGS, NULL},
{ (char *)"CdiVariable_taxis_set", _wrap_CdiVariable_taxis_set, METH_VARARGS, NULL},
{ (char *)"CdiVariable_taxis_get", _wrap_CdiVariable_taxis_get, METH_VARARGS, NULL},
{ (char *)"CdiVariable__print", _wrap_CdiVariable__print, METH_VARARGS, NULL},
{ (char *)"CdiVariable_sinfo", _wrap_CdiVariable_sinfo, METH_VARARGS, NULL},
{ (char *)"CdiVariable_readField", _wrap_CdiVariable_readField, METH_VARARGS, NULL},
{ (char *)"CdiVariable_readFieldWithLevel", _wrap_CdiVariable_readFieldWithLevel, METH_VARARGS, NULL},
{ (char *)"CdiVariable_readFieldF", _wrap_CdiVariable_readFieldF, METH_VARARGS, NULL},
......
......@@ -27099,7 +27099,7 @@ fail:
 
 
SWIGINTERN VALUE
_wrap_CdiVariable_print(int argc, VALUE *argv, VALUE self) {
_wrap_CdiVariable_sinfo(int argc, VALUE *argv, VALUE self) {
CdiVariable *arg1 = (CdiVariable *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
......@@ -27109,10 +27109,10 @@ _wrap_CdiVariable_print(int argc, VALUE *argv, VALUE self) {
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CdiVariable, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","print", 1, self ));
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiVariable *","sinfo", 1, self ));
}
arg1 = reinterpret_cast< CdiVariable * >(argp1);
(arg1)->print();
(arg1)->sinfo();
return Qnil;
fail:
return Qnil;
......@@ -29234,7 +29234,7 @@ SWIGEXPORT void Init_CdiObj(void) {
rb_define_method(SwigClassCdiVariable.klass, "zaxis", VALUEFUNC(_wrap_CdiVariable_zaxis_get), -1);
rb_define_method(SwigClassCdiVariable.klass, "taxis=", VALUEFUNC(_wrap_CdiVariable_taxis_set), -1);
rb_define_method(SwigClassCdiVariable.klass, "taxis", VALUEFUNC(_wrap_CdiVariable_taxis_get), -1);
rb_define_method(SwigClassCdiVariable.klass, "print", VALUEFUNC(_wrap_CdiVariable_print), -1);
rb_define_method(SwigClassCdiVariable.klass, "sinfo", VALUEFUNC(_wrap_CdiVariable_sinfo), -1);
rb_define_method(SwigClassCdiVariable.klass, "readField", VALUEFUNC(_wrap_CdiVariable_readField), -1);
rb_define_method(SwigClassCdiVariable.klass, "readFieldWithLevel", VALUEFUNC(_wrap_CdiVariable_readFieldWithLevel), -1);
rb_define_method(SwigClassCdiVariable.klass, "readFieldF", VALUEFUNC(_wrap_CdiVariable_readFieldF), -1);
......
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