summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2023-01-26 12:58:46 -0600
committerJason Madden <jamadden@gmail.com>2023-01-26 12:58:46 -0600
commit86c4e2a98f1bd27eff38edd5dba8c10300bc8e64 (patch)
treefd24b175b39e25bfb0c7aa03e86e43b5c2f4e604
parent8a6d691b3df74ba1a8243cd9f81034a59bb04095 (diff)
downloadgreenlet-86c4e2a98f1bd27eff38edd5dba8c10300bc8e64.tar.gz
Add the rebind member to the allocator.
Based on, and fixes #335
-rw-r--r--CHANGES.rst2
-rw-r--r--src/greenlet/greenlet_allocator.hpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 9f31503..856ea27 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,7 +8,7 @@
- Fix calling ``greenlet.settrace()`` with the same tracer object that
was currently active. See `issue 332
<https://github.com/python-greenlet/greenlet/issues/332>`_.
-
+- Various compilation and standards conformance fixes. See #335, #336.
2.0.1 (2022-11-07)
diff --git a/src/greenlet/greenlet_allocator.hpp b/src/greenlet/greenlet_allocator.hpp
index 666307d..b452f54 100644
--- a/src/greenlet/greenlet_allocator.hpp
+++ b/src/greenlet/greenlet_allocator.hpp
@@ -51,6 +51,11 @@ namespace greenlet
else
PyMem_Free(p);
}
+ // This member is deprecated in C++17 and removed in C++20
+ template< class U >
+ struct rebind {
+ typedef PythonAllocator<U> other;
+ };
};
}