From 40900dc1c54c14ea9f188c7242b88d464d067a44 Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Thu, 19 Mar 2020 12:21:12 -0400 Subject: [PATCH] Bump AVISYNTH_INTERFACE_VERSION to version 7. In honesty, this probably should have been bumped a couple of times already during AviSynth+ development, especially after high bit depth was added, but it never was. Basically, if API functions in avisynth.h and/or avisynth_c.h change in a way that breaks compatibility with previous versions, it needs to be bumped, and when new API functions are added, it needs to be bumped. While I'm not sure if any breaking changes to existing functions have happened in Plus as of yet (due to the focus on maintaining compatibility with 2.6), we certainly have added new API functions. This means that checking avs_get_version could be used to ensure the presence of Plus-specific functions, as version 7 will guarantee it (and since classic 2.6 hasn't had a release or commit in almost four years, avs_get_version returning 7 also means you're using Plus). Unfortunately, the lag here means that anything that checks for version 6 compatibility will need to use GetProcAddress or dlsym to figure out whether it's talking to classic or Plus. --- avs_core/include/avisynth.h | 8 ++++---- avs_core/include/avisynth_c.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/avs_core/include/avisynth.h b/avs_core/include/avisynth.h index 8834f5902..6b7d79a1b 100644 --- a/avs_core/include/avisynth.h +++ b/avs_core/include/avisynth.h @@ -52,8 +52,8 @@ -#ifndef __AVISYNTH_6_H__ -#define __AVISYNTH_6_H__ +#ifndef __AVISYNTH_7_H__ +#define __AVISYNTH_7_H__ #include "avs/config.h" #include "avs/capi.h" @@ -64,7 +64,7 @@ #define __cdecl #endif -enum { AVISYNTH_INTERFACE_VERSION = 6 }; +enum { AVISYNTH_INTERFACE_VERSION = 7 }; /* Compiler-specific crap */ @@ -1393,4 +1393,4 @@ AVSC_API(IScriptEnvironment2*, CreateScriptEnvironment2)(int version = AVISYNTH_ #pragma pack(pop) -#endif //__AVISYNTH_6_H__ +#endif //__AVISYNTH_7_H__ diff --git a/avs_core/include/avisynth_c.h b/avs_core/include/avisynth_c.h index 689f77846..1a8f786d5 100644 --- a/avs_core/include/avisynth_c.h +++ b/avs_core/include/avisynth_c.h @@ -66,8 +66,8 @@ // Constants // -#ifndef __AVISYNTH_6_H__ -enum { AVISYNTH_INTERFACE_VERSION = 6 }; +#ifndef __AVISYNTH_7_H__ +enum { AVISYNTH_INTERFACE_VERSION = 7 }; #endif enum {AVS_SAMPLE_INT8 = 1<<0,