Mercurial > octave
changeset 20614:d35201e5ce5d
Fix compilation of jit broken by dd6345fd8a97 (bug #46191).
* jit-typeinfo.cc (octave_jit_compute_nelem): Use rng.numel() rather than
deprecated nelem().
* jit-typeinfo.cc (octave_jit_ginvalid_index): Call gripe_invalid_index (-1)
now that 0-argument form of function has been removed.
* jit-typeinfo.h (jit_range): Use numel() rather than nelem() for Range.
* pt-jit.cc (trip_count): Use numel() rather than nelem() for Range.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 12 Oct 2015 16:08:12 -0700 |
parents | 27c091f4b66d |
children | 93d96da9ff3e |
files | libinterp/corefcn/jit-typeinfo.cc libinterp/corefcn/jit-typeinfo.h libinterp/corefcn/pt-jit.cc |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/jit-typeinfo.cc Mon Oct 12 23:28:29 2015 +0200 +++ b/libinterp/corefcn/jit-typeinfo.cc Mon Oct 12 16:08:12 2015 -0700 @@ -115,7 +115,7 @@ octave_jit_compute_nelem (double base, double limit, double inc) { Range rng = Range (base, limit, inc); - return rng.nelem (); + return rng.numel (); } extern "C" void @@ -221,7 +221,9 @@ extern "C" void octave_jit_ginvalid_index (void) { - gripe_invalid_index (); + // FIXME: 0-argument form of gripe_invalid_index removed in cset dd6345fd8a97 + // Report -1 as the bad index for all occurrences. + gripe_invalid_index (-1); } extern "C" void
--- a/libinterp/corefcn/jit-typeinfo.h Mon Oct 12 23:28:29 2015 +0200 +++ b/libinterp/corefcn/jit-typeinfo.h Mon Oct 12 16:08:12 2015 -0700 @@ -45,7 +45,7 @@ jit_range { jit_range (const Range& from) : base (from.base ()), limit (from.limit ()), - inc (from.inc ()), nelem (from.nelem ()) + inc (from.inc ()), nelem (from.numel ()) { } operator Range () const