aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidecleanup.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/pysidecleanup.h')
-rw-r--r--sources/pyside6/libpyside/pysidecleanup.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysidecleanup.h b/sources/pyside6/libpyside/pysidecleanup.h
new file mode 100644
index 000000000..cc5bbb0e6
--- /dev/null
+++ b/sources/pyside6/libpyside/pysidecleanup.h
@@ -0,0 +1,20 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef PYSIDECLEANUP_H
+#define PYSIDECLEANUP_H
+
+#include <pysidemacros.h>
+
+namespace PySide
+{
+
+using CleanupFunction = void(*)();
+
+/// Register a function to be called before python dies
+PYSIDE_API void registerCleanupFunction(CleanupFunction func);
+PYSIDE_API void runCleanupFunctions();
+
+} //namespace PySide
+
+#endif // PYSIDECLEANUP_H