|
1 | 1 | From 24b94cde0a5fa6b46be05359b7218af9bb295d87 Mon Sep 17 00:00:00 2001 |
2 | 2 | From: Jonas Rembser <jonas.rembser@cern.ch> |
3 | 3 | Date: Tue, 12 Mar 2024 01:59:37 +0100 |
4 | | -Subject: [PATCH] [CPyCppyy] Adapt to no `std::` in ROOT |
| 4 | +Subject: [PATCH 1/2] [CPyCppyy] Adapt to no `std::` in ROOT |
5 | 5 |
|
6 | 6 | --- |
7 | 7 | .../pyroot/cppyy/CPyCppyy/src/Converters.cxx | 20 +++++++++++-------- |
@@ -127,3 +127,58 @@ index c1720cf3f2..ae0e31cac8 100644 |
127 | 127 | -- |
128 | 128 | 2.44.0 |
129 | 129 |
|
| 130 | +From ef0836c23c850ce3113d5a7ff5787dee9e094099 Mon Sep 17 00:00:00 2001 |
| 131 | +From: Aaron Jomy <aaron.jomy@cern.ch> |
| 132 | +Date: Tue, 21 Jan 2025 14:09:03 +0100 |
| 133 | +Subject: [PATCH 2/2] [PyROOT] Add executors and converters for `std::byte` |
| 134 | + |
| 135 | +Fixes issue: https://github.com/root-project/root/issues/17442 |
| 136 | +--- |
| 137 | + bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx | 3 +++ |
| 138 | + bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx | 5 +++++ |
| 139 | + 2 files changed, 8 insertions(+) |
| 140 | + |
| 141 | +diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx |
| 142 | +index c127604a6e..21d3d4aa73 100644 |
| 143 | +--- a/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx |
| 144 | ++++ b/bindings/pyroot/cppyy/CPyCppyy/src/Converters.cxx |
| 145 | +@@ -3522,8 +3522,11 @@ public: |
| 146 | + gf["const signed char&"] = gf["const char&"]; |
| 147 | + #if __cplusplus > 201402L |
| 148 | + gf["std::byte"] = gf["uint8_t"]; |
| 149 | ++ gf["byte"] = gf["uint8_t"]; |
| 150 | + gf["const std::byte&"] = gf["const uint8_t&"]; |
| 151 | ++ gf["const byte&"] = gf["const uint8_t&"]; |
| 152 | + gf["std::byte&"] = gf["uint8_t&"]; |
| 153 | ++ gf["byte&"] = gf["uint8_t&"]; |
| 154 | + #endif |
| 155 | + gf["std::int8_t"] = gf["int8_t"]; |
| 156 | + gf["const std::int8_t&"] = gf["const int8_t&"]; |
| 157 | +diff --git a/bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx b/bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx |
| 158 | +index 5e94846771..edefcf5b5b 100644 |
| 159 | +--- a/bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx |
| 160 | ++++ b/bindings/pyroot/cppyy/CPyCppyy/src/Executors.cxx |
| 161 | +@@ -1022,6 +1022,8 @@ public: |
| 162 | + #if __cplusplus > 201402L |
| 163 | + gf["std::byte ptr"] = (ef_t)+[](cdims_t d) { return new ByteArrayExecutor{d}; }; |
| 164 | + gf["const std::byte ptr"] = gf["std::byte ptr"]; |
| 165 | ++ gf["byte ptr"] = gf["std::byte ptr"]; |
| 166 | ++ gf["const byte ptr"] = gf["std::byte ptr"]; |
| 167 | + #endif |
| 168 | + gf["int8_t ptr"] = (ef_t)+[](cdims_t d) { return new Int8ArrayExecutor{d}; }; |
| 169 | + gf["uint8_t ptr"] = (ef_t)+[](cdims_t d) { return new UInt8ArrayExecutor{d}; }; |
| 170 | +@@ -1046,8 +1048,11 @@ public: |
| 171 | + gf["internal_enum_type_t ptr"] = gf["int ptr"]; |
| 172 | + #if __cplusplus > 201402L |
| 173 | + gf["std::byte"] = gf["uint8_t"]; |
| 174 | ++ gf["byte"] = gf["uint8_t"]; |
| 175 | + gf["std::byte&"] = gf["uint8_t&"]; |
| 176 | ++ gf["byte&"] = gf["uint8_t&"]; |
| 177 | + gf["const std::byte&"] = gf["const uint8_t&"]; |
| 178 | ++ gf["const byte&"] = gf["const uint8_t&"]; |
| 179 | + #endif |
| 180 | + gf["std::int8_t"] = gf["int8_t"]; |
| 181 | + gf["std::int8_t&"] = gf["int8_t&"]; |
| 182 | +-- |
| 183 | +2.43.0 |
| 184 | + |
0 commit comments