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

 
 

bug #41045: OCTAVE_API_VERSION removed from version.h

Submitted by:  Orion Poplawski <opoplawski>
Submitted on:  Tue 31 Dec 2013 07:01:54 PM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by opoplawski (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Jan 2014 03:43:34 AM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 07 Jan 2014 04:49:20 PM UTCjweStatusNeed Info=>None
    Sat 04 Jan 2014 11:31:18 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1