Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ tests/test_files/iteratorwrapper.pyx
tests/test_files/namespaces.pyx
tests/test_files/number_conv.pyx
tests/test_files/enums.pyx
tests/test_files/wrapped_container_wrapper.pyx

# generated typestubs
tests/test_files/*.pyi

_codeql_detected_source_root
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
autowrap 0.24.0 (unreleased)


New STL Container Support (C++17):

- Added `std::unordered_map<K,V>` converter - maps to Python `dict`
- Added `std::unordered_set<T>` converter - maps to Python `set`
- Added `std::deque<T>` converter - maps to Python `list`
- Added `std::list<T>` converter - maps to Python `list`
- Added `std::optional<T>` converter - maps to Python `T | None`
- Added `std::string_view` converter - maps to Python `bytes`/`str`

Other Changes:

- Updated default C++ standard from C++11 to C++17 for compilation
(required for `std::optional` and `std::string_view` support)
- Fixed converter architecture to properly handle `None` values for
`std::optional<T>` input parameters
- Support for enums with the same name in different C++ namespaces using
scoped enum declarations with `wrap-as` annotation for renaming
- Support for arbitrary key types in `operator[]` (getitem/setitem), not
Expand Down
6 changes: 6 additions & 0 deletions autowrap/CodeGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,12 @@ def create_default_cimports(self):
|from libcpp.vector cimport vector as libcpp_vector
|from libcpp.pair cimport pair as libcpp_pair
|from libcpp.map cimport map as libcpp_map
|from libcpp.unordered_map cimport unordered_map as libcpp_unordered_map
|from libcpp.unordered_set cimport unordered_set as libcpp_unordered_set
|from libcpp.deque cimport deque as libcpp_deque
|from libcpp.list cimport list as libcpp_list
|from libcpp.optional cimport optional as libcpp_optional
|from libcpp.string_view cimport string_view as libcpp_string_view
|from libcpp cimport bool
|from libc.string cimport const_char
|from cython.operator cimport dereference as deref,
Expand Down
Loading