Mercurial > hg > octave-jordi
changeset 21018:8a65589d1a42
maint: Dereference current_liboctave_error_handler before calling.
For conformity with the rest of liboctave,
call (*current_liboctave_error_handler) (...).
* Array-util.cc, idx-vector.cc, cmd-edit.cc,
singleton-cleanup.cc:
Dereference current_liboctave_error_handler before calling.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Dec 2015 13:16:43 -0800 |
parents | cb1eb7d9a89f |
children | 7ebc9f38b312 |
files | liboctave/array/Array-util.cc liboctave/array/idx-vector.cc liboctave/util/cmd-edit.cc liboctave/util/singleton-cleanup.cc |
diffstat | 4 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/Array-util.cc +++ b/liboctave/array/Array-util.cc @@ -555,7 +555,8 @@ if (clen < 0) clen = idx.length (n); else if (clen != idx.length (n)) - current_liboctave_error_handler ("sub2ind: lengths of indices must match"); + (*current_liboctave_error_handler) + ("sub2ind: lengths of indices must match"); if (idx.extent (n) > n) gripe_index_out_of_range (len, i+1, idx.extent (n), n); @@ -613,7 +614,7 @@ } } else - current_liboctave_error_handler ("sub2ind: needs at least 2 indices"); + (*current_liboctave_error_handler) ("sub2ind: needs at least 2 indices"); return retval; } @@ -627,7 +628,7 @@ octave_idx_type numel = dv.numel (); if (idx.extent (numel) > numel) - current_liboctave_error_handler ("ind2sub: index out of range"); + (*current_liboctave_error_handler) ("ind2sub: index out of range"); else { if (idx.is_scalar ())
--- a/liboctave/array/idx-vector.cc +++ b/liboctave/array/idx-vector.cc @@ -1074,7 +1074,7 @@ switch (rep->idx_class ()) { case class_colon: - current_liboctave_error_handler ("colon not allowed"); + (*current_liboctave_error_handler) ("colon not allowed"); break; case class_range:
--- a/liboctave/util/cmd-edit.cc +++ b/liboctave/util/cmd-edit.cc @@ -966,7 +966,7 @@ if (! instance) { - current_liboctave_error_handler + (*current_liboctave_error_handler) ("unable to create command history object!"); retval = false; @@ -1840,11 +1840,11 @@ void command_editor::error (int err_num) { - current_liboctave_error_handler ("%s", gnulib::strerror (err_num)); + (*current_liboctave_error_handler) ("%s", gnulib::strerror (err_num)); } void command_editor::error (const std::string& s) { - current_liboctave_error_handler ("%s", s.c_str ()); + (*current_liboctave_error_handler) ("%s", s.c_str ()); }