[PD-dev] Pd 0.42-0 test 6 available
Hans-Christoph Steiner
hans at eds.org
Fri Dec 12 00:58:32 CET 2008
On Dec 11, 2008, at 1:54 PM, Martin Peach wrote:
> IOhannes m zmoelnig wrote:
>> Hans-Christoph Steiner wrote:
>>> IOhannes m zmoelnig wrote:
>>>> speaking of adding things to the Pd API...
>>>> is it totally out of your ways to
>>>> - add a function that returns the version of Pd?
>>>> something like "const char* pd_versionstring(void)" would be nice.
>>>> this could be used to ensure that an external is running with a Pd
>>>> version compatible to the one it was compiled against
>>>
>>> Since the version will most likely be used for a numeric
>>> comparison, and
>>> it is stored as a number, perhaps it makes sense to return
>>> numeric types
>>> instead of a char*?
>>>
>>> int pd_majorversion(void)
>>> int pd_minorversion(void)
>>> int pd_bugfixversion(void)
>>
>>
>> personally i don't care so much for the details.
>> i proposed the string as it outputs the full version number (with all
>> "test" and whatnot).
>
> Why not add 4 global variables
>
> EXTERN t_int pd_majorversion;
> EXTERN t_int pd_minorversion;
> EXTERN t_int pd_bugfixversion;
> EXTERN t_symbol pd_testversion;
>
> ...to m_pd.h, which would be initialized when pd starts up from the
> #defines
> PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION and
> PD_TEST_VERSION?
>
> Or make it a struct:
>
> typedef struct
> {
> t_int major_version;
> t_int minor_version;
> t_int bugfix_version;
> t_symbol test_version;
> } t_pd_version;
> EXTERN t_pd_version pd_version;
I like both of these ideas.
.hc
> Martin
>
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
------------------------------------------------------------------------
----
I spent 33 years and four months in active military service and
during that period I spent most of my time as a high class muscle man
for Big Business, for Wall Street and the bankers. - General
Smedley Butler
More information about the Pd-dev
mailing list