Skip to content

Commit

Permalink
use PD_VERSION_CODE for version comparision
Browse files Browse the repository at this point in the history
  • Loading branch information
umlaeute committed Mar 14, 2024
1 parent 45ceca5 commit 2b5587e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions iemnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
# include <sys/un.h>
#endif

#ifndef PD_VERSION_CODE
# define PD_VERSION_CODE IEMNET_VERSION(PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION)
#endif


#if IEMNET_VERSION(PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION) < IEMNET_VERSION(0, 52, 0)
#if PD_VERSION_CODE < IEMNET_VERSION(0, 52, 0)
# define PD_DEBUG 3
#endif

Expand Down Expand Up @@ -237,7 +241,7 @@ int iemnet__register(const char*name)
post(" copyright © 2010-2015 IOhannes m zmoelnig, IEM");
post(" based on mrpeach/net, based on maxlib");
}
#if IEMNET_VERSION(PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION) > IEMNET_VERSION(0, 43, 0)
#if PD_VERSION_CODE > IEMNET_VERSION(0, 43, 0)
logpost(0, PD_DEBUG, "iemnet: loaded [%s]", name);
#else
post("iemnet: loaded [%s]", name);
Expand Down Expand Up @@ -314,7 +318,7 @@ void iemnet_log(const void *object, const t_iemnet_loglevel level, const char *f
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
strcat(buf, "\0");
#if IEMNET_VERSION(PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION) > IEMNET_VERSION(0, 43, 0)
#if PD_VERSION_CODE > IEMNET_VERSION(0, 43, 0)
logpost(x, level, "[%s]: %s", name, buf);
#else
if(level>1) {
Expand Down

0 comments on commit 2b5587e

Please sign in to comment.