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 )
|