at master 1.3 kB view raw
1From f16912c7932ecc1cceb2fd9565fcae37bfd0447b Mon Sep 17 00:00:00 2001 2From: wxt <3264117476@qq.com> 3Date: Tue, 22 Oct 2024 11:07:58 +0800 4Subject: [PATCH] tt 5 6--- 7 sip/siplib/bool.c | 22 ++++++++++++++++++++++ 8 1 file changed, 22 insertions(+) 9 create mode 100644 sip/siplib/bool.c 10 11diff --git a/sip/siplib/bool.c b/sip/siplib/bool.c 12new file mode 100644 13index 0000000..781babb 14--- /dev/null 15+++ b/sip/siplib/bool.c 16@@ -0,0 +1,22 @@ 17+// This contains all the C++ code that is needed by the sip module. 18+// 19+// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com> 20+// 21+// This file is part of SIP. 22+// 23+// This copy of SIP is licensed for use under the terms of the SIP License 24+// Agreement. See the file LICENSE for more details. 25+// 26+// This copy of SIP may also used under the terms of the GNU General Public 27+// License v2 or v3 as published by the Free Software Foundation which can be 28+// found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. 29+// 30+// SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of 31+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 32+ 33+ 34+// Set a C++ bool for the main C implementation of the module. 35+extern "C" void sipSetBool(void *ptr, int val) 36+{ 37+ *reinterpret_cast<bool *>(ptr) = !!val; 38+} 39-- 402.46.1 41