summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/PC/invalid_parameter_handler.c
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2024-02-19 02:38:52 +0300
committerthegeorg <[email protected]>2024-02-19 02:50:43 +0300
commitd96fa07134c06472bfee6718b5cfd1679196fc99 (patch)
tree31ec344fa9d3ff8dc038692516b6438dfbdb8a2d /contrib/tools/python3/PC/invalid_parameter_handler.c
parent452cf9e068aef7110e35e654c5d47eb80111ef89 (diff)
Sync contrib/tools/python3 layout with upstream
* Move src/ subdir contents to the top of the layout * Rename self-written lib -> lib2 to avoid CaseFolding warning from the VCS * Regenerate contrib/libs/python proxy-headers accordingly 4ccc62ac1511abcf0fed14ccade38e984e088f1e
Diffstat (limited to 'contrib/tools/python3/PC/invalid_parameter_handler.c')
-rw-r--r--contrib/tools/python3/PC/invalid_parameter_handler.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/tools/python3/PC/invalid_parameter_handler.c b/contrib/tools/python3/PC/invalid_parameter_handler.c
new file mode 100644
index 00000000000..d634710cbec
--- /dev/null
+++ b/contrib/tools/python3/PC/invalid_parameter_handler.c
@@ -0,0 +1,22 @@
+#ifdef _MSC_VER
+
+#include <stdlib.h>
+
+#if _MSC_VER >= 1900
+/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
+ * macros. It does not need to be defined when building using MSVC
+ * earlier than 14.0 (_MSC_VER == 1900).
+ */
+
+static void __cdecl _silent_invalid_parameter_handler(
+ wchar_t const* expression,
+ wchar_t const* function,
+ wchar_t const* file,
+ unsigned int line,
+ uintptr_t pReserved) { }
+
+_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler;
+
+#endif
+
+#endif