Skip to content

Commit

Permalink
Update print() signature for octave 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jul 10, 2015
1 parent 248890a commit 350c410
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Lib/octave/octrun.swg
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,11 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
return octave_value();
}

#if SWIG_OCTAVE_PREREQ(4,0,0)
void print(std::ostream &os, bool pr_as_read_syntax = false) {
#else
void print(std::ostream &os, bool pr_as_read_syntax = false) const {
#endif
if (is_string()) {
os << string_value();
return;
Expand Down Expand Up @@ -1126,7 +1130,11 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
virtual octave_value convert_to_str_internal(bool pad, bool force, char type) const
{ return ptr->convert_to_str_internal(pad, force, type); }

#if SWIG_OCTAVE_PREREQ(4,0,0)
void print(std::ostream &os, bool pr_as_read_syntax = false)
#else
void print(std::ostream &os, bool pr_as_read_syntax = false) const
#endif
{ return ptr->print(os, pr_as_read_syntax); }

private:
Expand Down Expand Up @@ -1169,7 +1177,11 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
return true;
}

#if SWIG_OCTAVE_PREREQ(4,0,0)
void print(std::ostream &os, bool pr_as_read_syntax = false) {
#else
void print(std::ostream &os, bool pr_as_read_syntax = false) const {
#endif
indent(os);
os << "swig packed type: name = " << (type ? type->name : std::string()) << ", len = " << buf.size(); newline(os);
}
Expand Down

0 comments on commit 350c410

Please sign in to comment.