1
- From df4bb6b9a55edb35701b3592d32f338d60ad2948 Mon Sep 17 00:00:00 2001
1
+ From 8b3416e182ddbba1142dda53252f7f9254ed3a34 Mon Sep 17 00:00:00 2001
2
2
From: Mohaned Qunaibit <
[email protected] >
3
3
Date: Thu, 22 Jun 2023 14:15:50 +0300
4
4
Subject: [PATCH] patch 2.10.4
5
5
6
6
---
7
7
include/pybind11/cast.h | 8 ++++----
8
- include/pybind11/chrono.h | 8 +++++---
9
8
include/pybind11/detail/class.h | 10 +++++-----
10
9
include/pybind11/detail/common.h | 6 +++---
11
10
include/pybind11/detail/internals.h | 14 +++++++-------
12
11
include/pybind11/detail/type_caster_base.h | 6 +++---
13
- include/pybind11/embed.h | 2 +-
14
12
include/pybind11/eval.h | 2 +-
15
13
include/pybind11/gil.h | 4 ++--
16
14
include/pybind11/pybind11.h | 10 +++++-----
@@ -27,7 +25,7 @@ Subject: [PATCH] patch 2.10.4
27
25
tests/test_iostream.py | 2 +-
28
26
tests/test_pytypes.cpp | 2 +-
29
27
tests/test_virtual_functions.py | 2 +-
30
- 23 files changed, 60 insertions(+), 58 deletions(-)
28
+ 21 files changed, 54 insertions(+), 54 deletions(-)
31
29
32
30
diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
33
31
index 3a40460..a602012 100644
@@ -69,44 +67,6 @@ index 3a40460..a602012 100644
69
67
return UTF_N == 8 ? PyUnicode_DecodeUTF8(buffer, nbytes, nullptr)
70
68
: UTF_N == 16 ? PyUnicode_DecodeUTF16(buffer, nbytes, nullptr, nullptr)
71
69
: PyUnicode_DecodeUTF32(buffer, nbytes, nullptr, nullptr);
72
- diff --git a/include/pybind11/chrono.h b/include/pybind11/chrono.h
73
- index 167ea0e..5249c86 100644
74
- --- a/include/pybind11/chrono.h
75
- +++ b/include/pybind11/chrono.h
76
- @@ -42,13 +42,13 @@ public:
77
- return false;
78
- }
79
- // If invoked with datetime.delta object
80
- - if (PyDelta_Check(src.ptr())) {
81
- + /*if (PyDelta_Check(src.ptr())) {
82
- value = type(duration_cast<duration<rep, period>>(
83
- days(PyDateTime_DELTA_GET_DAYS(src.ptr()))
84
- + seconds(PyDateTime_DELTA_GET_SECONDS(src.ptr()))
85
- + microseconds(PyDateTime_DELTA_GET_MICROSECONDS(src.ptr()))));
86
- return true;
87
- - }
88
- + }*/
89
- // If invoked with a float we assume it is seconds and convert
90
- if (PyFloat_Check(src.ptr())) {
91
- value = type(duration_cast<duration<rep, period>>(
92
- @@ -135,6 +135,8 @@ public:
93
- std::tm cal;
94
- microseconds msecs;
95
-
96
- + return false;
97
- + /*
98
- if (PyDateTime_Check(src.ptr())) {
99
- cal.tm_sec = PyDateTime_DATE_GET_SECOND(src.ptr());
100
- cal.tm_min = PyDateTime_DATE_GET_MINUTE(src.ptr());
101
- @@ -167,7 +169,7 @@ public:
102
- }
103
-
104
- value = time_point_cast<Duration>(system_clock::from_time_t(std::mktime(&cal)) + msecs);
105
- - return true;
106
- + return true;*/
107
- }
108
-
109
- static handle cast(const std::chrono::time_point<std::chrono::system_clock, Duration> &src,
110
70
diff --git a/include/pybind11/detail/class.h b/include/pybind11/detail/class.h
111
71
index bc2b40c..19388e8 100644
112
72
--- a/include/pybind11/detail/class.h
@@ -281,19 +241,6 @@ index 0b710d7..e0ccbf9 100644
281
241
return PyThreadState_GET();
282
242
#else
283
243
return _PyThreadState_UncheckedGet();
284
- diff --git a/include/pybind11/embed.h b/include/pybind11/embed.h
285
- index 749c75b..e52a0f9 100644
286
- --- a/include/pybind11/embed.h
287
- +++ b/include/pybind11/embed.h
288
- @@ -15,7 +15,7 @@
289
- #include <memory>
290
- #include <vector>
291
-
292
- - #if defined(PYPY_VERSION)
293
- + #if defined(PYPY_VERSION) || defined(GRAALVM_PYTHON)
294
- # error Embedding the interpreter is not supported with PyPy
295
- #endif
296
-
297
244
diff --git a/include/pybind11/eval.h b/include/pybind11/eval.h
298
245
index bd5f981..c25f036 100644
299
246
--- a/include/pybind11/eval.h
0 commit comments