bugGNU Octave - Bugs: bug #61815, [octave forge] (image) Fixing...

 
 

bug #61815: [octave forge] (image) Fixing Range Deprecation

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Thu 13 Jan 2022 10:11:53 PM UTC
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Sun 16 Jan 2022 06:33:55 AM UTC, comment #9: 

Thanks. Closing

Avinoam Kalma <avinoam>
Project Member
Fri 14 Jan 2022 01:17:35 PM UTC, comment #8: 

This seems to work fine, also in several older versions of core Octave. Thanks for the fix.

Hartmut <hardy>
Fri 14 Jan 2022 10:35:11 AM UTC, comment #7: 

Somehow it worked with include <oct.h>, but it works also with
include <Range.h>, so I have changed it:
http://hg.code.sf.net/p/octave/image/rev/61e426d009ed

Avinoam Kalma <avinoam>
Project Member
Fri 14 Jan 2022 10:29:43 AM UTC, comment #6: 

I don't see where "oct.h" pulls in "Range.h":
https://octave.org/doxygen/dev/d2/d3c/oct_8h.html

But I might be missing something...

Markus Mützel <mmuetzel>
Project Member
Fri 14 Jan 2022 10:25:34 AM UTC, comment #5: 

The header that defines `octave::range` is still called "Range.h" in a current tip of the development branch:
http://hg.savannah.gnu.org/hgweb/octave/file/f3a766367bff/liboctave/array/Range.h

Markus Mützel <mmuetzel>
Project Member
Fri 14 Jan 2022 10:20:47 AM UTC, comment #4: 

Thanks.

It works on 7.0.90 and on 4.2.0.

I think that I do not need the include <Range.h> because the test should fail on the versions with Range.
(I am checking for the existence of octave::range and not the existence of Range).

Avinoam Kalma <avinoam>
Project Member
Fri 14 Jan 2022 10:08:03 AM UTC, comment #3: 

Sorry. You'd need to use braces (as you are already). That is `#include <Range.h>` (potentially).

Markus Mützel <mmuetzel>
Project Member
Fri 14 Jan 2022 10:06:15 AM UTC, comment #2: 

Does the test work as it is? (Check your config.log when compiling with different versions of Octave.)
Maybe you'll need to `#include "Range.h"` in that test...

Markus Mützel <mmuetzel>
Project Member
Fri 14 Jan 2022 09:48:35 AM UTC, comment #1: 

It seems to be solved with
http://hg.code.sf.net/p/octave/image/rev/8ef27a35f775

Is it the right solution?
I will be glad for feedback.

Avinoam Kalma <avinoam>
Project Member
Thu 13 Jan 2022 10:11:53 PM UTC, original submission:  

The range function is deprecated in the next Octave version.
I have fixed it in
http://hg.code.sf.net/p/octave/image/rev/ba0a403d99f3

Now, the image package compiles on 7.0.9 without deprecation warnings, but it fails on previous versions of Octave:

hough_line.cc:59:31: error: 'range' is not a member of 'octave'
   RowVector bins = RowVector (octave::range<double> (1, nr_bins).array_value ()) - ceil (nr_bins/2.0)

How do I fix this routine such that it will work on the next Octave version, and on previous versions?

Avinoam Kalma <avinoam>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam (Submitted the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-16 avinoam Open/ClosedOpen Closed
    2022-01-14 avinoam StatusNone Fixed
        Carbon-Copy- Added mmuetzel
    2022-01-13 avinoam Carbon-Copy- Added carandraug
        Carbon-Copy- Added hardy

    Back to the top


    Powered by Savane 3.9