bugGNU Octave - Bugs: bug #41045, OCTAVE_API_VERSION removed from...

 
 

bug #41045: OCTAVE_API_VERSION removed from version.h

Submitter:  Orion Poplawski <opoplawski>
Submitted:  Tue 31 Dec 2013 07:01:54 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 07 Jan 2014 04:49:20 PM UTC, comment #5: 

I checked in the following changeset:

  http://hg.savannah.gnu.org/hgweb/octave/rev/b6b6e0dc700e

This will be part of the 3.8.1 release.  So if you have OCTAVE_API_VERSION_NUMBER, you can check for features in older versions.  If you have OCTAVE_{MAJOR,MINOR,PATCH}, you can check for features in 3.8.1 and later.  If neither OCTAVE_API_VERSION_NUMBER or OCTAVE_MAJOR_VERSION is defined, you have 3.8.0.

Of course this won't help with development versions where pretty much anything goes, so I don't know how to help you there.  But then again, OCTAVE_API_VERSION_NUMBER was not reliable for development versions either.

John W. Eaton <jwe>
Group administrator
Tue 07 Jan 2014 03:50:21 PM UTC, comment #4: 

That could be a workable alternative - but please consult with the SWIG folks to confirm.  Thanks!

Orion Poplawski <opoplawski>
Tue 07 Jan 2014 05:01:14 AM UTC, comment #3: 

I'd really like to get rid of the API_VERSION altogether.

If people feel it's necessary to use a version number to identify features, then I suggest that we just provide the major and minor version numbers in macros.  Then you can include <octave/version.h> and check OCTAVE_MAJOR_VERSION and OCTAVE_MINOR_VERSION (or similar).

John W. Eaton <jwe>
Group administrator
Sun 05 Jan 2014 03:06:59 AM UTC, comment #2: 

In the case of SWIG, I don't think feature checks are really an option.  SIWG needs to determine at compile time, but independent of configuration methods, what octave API to use.

Orion Poplawski <opoplawski>
Sat 04 Jan 2014 11:31:18 PM UTC, comment #1: 

This was discussed on the mailing list.  JWE's opinion was that downstream software should check for features rather than version numbers.  What do you want to do with this bug report?

Rik <rik5>
Group administrator
Tue 31 Dec 2013 07:01:54 PM UTC, original submission:  

This commit:

changeset:   17510:7542f4496974
user:        John W. Eaton <jwe@octave.org>
date:        Sat Sep 28 15:04:14 2013 -0400
summary:     eliminate some macros in version.h

Appears to have gotten rid of OCTAVE_API_VERSION_NUMBER from version.h.  It appears that at least swig uses this macro in #ifdefs to handle changes in the Octave api and this is breaking swig generated code for octave 3.8.0 (see https://sourceforge.net/p/swig/bugs/1353/).

Is there a particular reason for this change?  Is there a better way to check API versions?  The text string OCTAVE_API_VERSION is a lot harder to parse.

Orion Poplawski <opoplawski>

 

(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 jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by opoplawski (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-08 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2014-01-07 jwe StatusNeed Info None
    2014-01-04 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code