File: 0004-Add-Long-unsigned-int-v.patch

package info (click to toggle)
pycxx 7.1.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,392 kB
  • sloc: cpp: 6,767; python: 1,138; sh: 85; ansic: 60; makefile: 18
file content (26 lines) | stat: -rw-r--r-- 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Andrey Rakhmatullin <wrar@debian.org>
Date: Wed, 3 Dec 2025 22:47:06 +0500
Subject: Add Long( unsigned int v ).

---
 CXX/Python3/Objects.hxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CXX/Python3/Objects.hxx b/CXX/Python3/Objects.hxx
index 6896702..205d593 100644
--- a/CXX/Python3/Objects.hxx
+++ b/CXX/Python3/Objects.hxx
@@ -617,6 +617,13 @@ namespace Py
             validate();
         }
 
+        // create from unsigned int
+        explicit Long( unsigned int v )
+        : Object( PyLong_FromUnsignedLong( v ), true )
+        {
+            validate();
+        }
+
         // create from int
         explicit Long( int v )
         : Object( PyLong_FromLong( static_cast<long>( v ) ), true )