[Dune] [Dune-Commit] dune-common r6422 - trunk/dune/common
Oliver Sander
sander at mi.fu-berlin.de
Mon Apr 18 15:49:20 CEST 2011
Hi Martin!
I put the change on the new 'recent changes' page.
Best,
Oliver
Am 18.04.2011 11:55, schrieb Martin Nolte:
> Hi Oli,
>
> this actually seems to be a cut'n'paste error that should be corrected
> (obviously we were using the wrong macro). Unless we change the
> DUNE_VERSION_NEWER_REV macro, it is not critical either. Uses of
> DUNE_VERSION_NEWER can always be replaced by DUNE_VERSION_NEWER_REV( ... , 0).
> Since it might have a big compatibility impact on derived modules (in our case
> dune-fem), we should announce this change prominently, though.
>
> Best,
>
> Martin
>
> On 04/17/2011 06:55 PM, Oliver Sander wrote:
>
>> Hi Martin!
>> You are right that this is an API change and I should not do this
>> without consulting the other developers.
>>
>> However, if you look at the code then you will agree that my patch
>> is correct. The macro DUNE_VERSION_NEWER never used its
>> 'revision' argument, therefore you could not use it to test for a
>> specific revision. For that there is a second macro DUNE_VERSION_NEWER_REV,
>> which has the 'revision' argument. Furthermore, removing the
>> unused argument is consistent with the DUNE_VERSION_EQUAL
>> macro, which doesn't have the 'revision' argument either.
>>
>> Nevertheless, as you are right about the API change I will gladly
>> revert the change if you still think it is necessary.
>>
>> Best,
>> Oliver
>>
>> Am 17.04.2011 14:58, schrieb Martin Nolte:
>>
>>> Hi Oli,
>>>
>>> actually the revision is used in dune-fem. Moreover, these macros were
>>> not introduced for checking within the core modules but rather to allow
>>> derived modules to check for some revision. Since we do use version
>>> numbers like 1.2.2 (i.e., the revision is 2), I think it is a good idea
>>> to check.
>>>
>>> Finally, I think that such invasive changes should be discussed before
>>> doing them.
>>>
>>> Yours,
>>>
>>> Martin
>>>
>>> On 04/17/2011 02:29 PM, sander at dune-project.org wrote:
>>>
>>>
>>>> Author: sander
>>>> Date: 2011-04-17 14:29:24 +0200 (Sun, 17 Apr 2011)
>>>> New Revision: 6422
>>>>
>>>> Modified:
>>>> trunk/dune/common/version.hh
>>>> Log:
>>>> remove macro argument 'revision' of macro DUNE_VERSION_NEWER, because it is
>>>> not used
>>>>
>>>> Modified: trunk/dune/common/version.hh
>>>> ===================================================================
>>>> --- trunk/dune/common/version.hh 2011-04-15 08:44:09 UTC (rev 6421)
>>>> +++ trunk/dune/common/version.hh 2011-04-17 12:29:24 UTC (rev 6422)
>>>> @@ -22,7 +22,7 @@
>>>> (DUNE_VERSION_JOIN(module,REVISION) == revision))
>>>>
>>>> /** \brief True if 'module' has the version major.minor or newer */
>>>> -#define DUNE_VERSION_NEWER(module,major,minor,revision) \
>>>> +#define DUNE_VERSION_NEWER(module,major,minor) \
>>>> ((DUNE_VERSION_JOIN(module,MAJOR)> major) \
>>>> || ((DUNE_VERSION_JOIN(module,MAJOR) == major)&&
>>>> (DUNE_VERSION_JOIN(module,MINOR)>= minor)))
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Dune-Commit mailing list
>>>> Dune-Commit at dune-project.org
>>>> http://lists.dune-project.org/mailman/listinfo/dune-commit
>>>>
>>>>
>>>
>>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>
>
More information about the Dune
mailing list