Comparing versions in xs #212

Open
FROGGS opened this Issue Jan 15, 2012 · 0 comments

Projects

None yet

1 participant

@FROGGS
Member
FROGGS commented Jan 15, 2012

We should use this to check versions like SDL_gfx in xs:

#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
      PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
      (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif

#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
      (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

So we should create makros like: SDLGFX_VERSION_GE(...) and SDLMIXER_Version_GE(...).

@FROGGS FROGGS was assigned Jan 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment