Fall back to using Py_Finalize() for Python version < 3.6

This commit is contained in:
Todd C. Miller
2020-04-06 07:05:20 -06:00
parent 4e44bd46fe
commit 93f5e1be36

View File

@@ -37,6 +37,11 @@ static size_t python_inittab_copy_len = 0;
#define PLUGIN_DIR ""
#endif
/* Py_FinalizeEx is new in version 3.6 */
#if PY_MAJOR_VERSION > 3 || PY_MINOR_VERSION < 6
# define Py_FinalizeEx() (Py_Finalize(), 0)
#endif
const char *
_lookup_value(char * const keyvalues[], const char *key)
{