]> granicus.if.org Git - python/commitdiff
bpo-36763, _testembed: enable assert() in release mode (GH-13857)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 6 Jun 2019 12:42:53 +0000 (05:42 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Jun 2019 12:42:53 +0000 (05:42 -0700)
(cherry picked from commit 013a18a65167725f140c0395211050ae03501b12)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Programs/_testembed.c

index 3e1210e04d8245824663c3c8c5e24c5bac22cc52..9633f4610b54942df30be7c9f07df39acf19210c 100644 (file)
@@ -1,10 +1,13 @@
-/* FIXME: PEP 587 makes these functions public */
 #ifndef Py_BUILD_CORE_MODULE
 #  define Py_BUILD_CORE_MODULE
 #endif
 
+/* Always enable assertion (even in release mode) */
+#undef NDEBUG
+
 #include <Python.h>
-#include "pycore_initconfig.h"   /* FIXME: PEP 587 makes these functions public */
+#include "pycore_initconfig.h"   /* _PyConfig_InitCompatConfig() */
+#include "pycore_pystate.h"      /* _PyRuntime */
 #include <Python.h>
 #include "pythread.h"
 #include <inttypes.h>