[PD-dev] getting Pd's version within Pd

Hans-Christoph Steiner hans at eds.org
Sat Jan 28 02:47:02 CET 2006


I am thinking it would be quite handy to be able to get the current  
version of Pd from in a patch.  This would probably take the form of a  
[version] object that returns the version when banged.  The output  
could look like this:

major minor bugfix i.e  [0 39 2(

Then you could specify a minimum Pd version for a patch, and have it  
test and give a warning if that minimum is not met.  Should be pretty  
easy to implement, but there is one thing needed that's not there in  
m_pd.h:

#define PD_BUGFIX_VERSION 2

as in:
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 39
#define PD_BUGFIX_VERSION 2

Also, the pd_version string in s_main.c should probably also use the  
above macros so the version is set in one place.

Comments, ideas, suggestions, objections?

.hc

________________________________________________________________________ 
____

"Information wants to be free."
                                      -Stewart Brand





More information about the Pd-dev mailing list