1036 Commits

Author SHA1 Message Date
Eisuke Kawashima fe087f9c2f feat(vector_indexing_suite): implement reverse 2026-07-05 22:30:33 -04:00
Eisuke Kawashima 660e8944ff feat(vector_indexing_suite): implement remove 2026-07-05 22:30:33 -04:00
Eisuke Kawashima 27ff6f6f37 feat(vector_indexing_suite): implement count 2026-07-05 22:30:33 -04:00
Eisuke Kawashima d8668c5963 feat(indexing_suite): implement clear 2026-07-05 22:30:33 -04:00
Eisuke Kawashima e08584a4ed feat(vector_indexing_suite): implement __iadd__ 2026-07-05 22:30:33 -04:00
O01eg c86ea207d1 Fix and add tests for module state 2026-06-26 21:52:16 -04:00
O01eg afd27c63d5 Provide 'state' accessor in module definition 2026-06-26 21:52:16 -04:00
O01eg d018bb17d4 Add POD state for multi-phase modules 2026-06-26 21:52:16 -04:00
O01eg b34c8953a6 Rename module to mod 2026-06-21 16:09:15 -04:00
O01eg b8b00933c6 Add mod_gil_not_used option to BOOST_PYTHON_MODULE_MULTI_PHASE_INIT 2026-06-21 16:09:15 -04:00
O01eg 0796140961 Fix indent and add more remarks to make it more manageable 2026-06-21 16:09:15 -04:00
O01eg 9e2f5191e5 Add support for multi-phase module initialization 2026-06-21 16:09:15 -04:00
Neil Schemenauer 5013564316 Add "nogil" option for BOOST_PYTHON_MODULE_INIT.
Implement optional arguments for BOOST_PYTHON_MODULE_INIT and allow the
boost::python::mod_gil_not_used() option.  This sets the
Py_MOD_GIL_NOT_USED flag for the extension module.

To define a module that supports free-threaded Python, define it
like this:

    BOOST_PYTHON_MODULE(my_module, boost::python::mod_gil_not_used())
    {
        ...
    }
2025-12-02 08:19:45 -05:00
Neil Schemenauer cfbefe893c Use re-entrant mutex to protect global state.
Add pymutex.hpp which implements a re-entrant mutex on top of Python's
PyMutex.  Add BOOST_PYTHON_LOCK_STATE() macro that uses RAII to lock
mutable global state as required.
2025-11-06 19:43:33 -08:00
Neil Schemenauer 6f5f3b6607 Add work-around to crash in ~object_base().
For the free-threaded build (and possibly the debug build), it is not
safe to call Py_DECREF() if there is no valid Python thread-state.
2025-11-06 19:42:41 -08:00
Anton Gladky 668bc7c106 Include missing header boost/type_traits/is_unsigned.hpp
During the Debian Packaging of new version it was found that
this header is missing during the rebuild with GCC-15.
2025-11-03 10:13:40 -05:00
Stefan Seefeld 5d7b9a0648 Stop testing c++98 support 2025-11-03 08:40:38 -05:00
Aditya Pillai a40bb656ee Use Py_REFCNT instead of ob_refcnt on Python 3.9 and above 2025-10-23 19:38:05 -04:00
Peter Dimov 2dc5a92727 Replace use of boost/iterator/detail/enable_if.hpp 2025-01-28 02:27:49 +02:00
Daniel Laügt b988d70207 Alignment fixes 2024-09-21 21:56:41 -04:00
Jakob van Santen c76d67ef3f Ensure that virtual default implementation has the same kwargs as dispatcher 2024-09-17 17:07:44 -04:00
Jakob van Santen 0102b31945 Unwrap back_reference in get_pytype()
This prevents back_reference parameters from decaying to "object" in py signatures
2024-09-17 17:07:44 -04:00
Jakob van Santen 4c6f40fb82 Add generated docstrings to property fget/fset 2024-09-17 17:07:44 -04:00
Jakob van Santen a498e2458c Qualify types defined in other modules 2024-09-17 17:07:44 -04:00
Jakob van Santen 7a3cc07042 Emit qualfied names in docstrings 2024-09-17 17:07:44 -04:00
Peter Dimov 6c3f3ecacf Normalize static/dynamic link macros and avoid redefinition warnings 2023-12-22 08:14:53 -05:00
Denis Arnaud 41e208ecb5 Update call_method.hpp
Was missing from https://github.com/boostorg/python/pull/320
I've tested it on one of my projects with (that patch on) Boost.Python/Boost 1.76.0 and it works well. Without that patch, there is a deprecation error.
2022-03-19 13:06:49 -04:00
TaWeiTu aee2667407 Fix deprecated usage of <boost/bind.hpp>
Replace <boost/bind.hpp> with <boost/bind/bind.hpp> and use namespace
boost::placeholders when necessary.
2021-06-09 07:16:19 -04:00
Stefan Seefeld aca3c80c4f Respect alignment of by-value storage. 2021-04-30 22:59:25 -04:00
Stefan Seefeld 500194edb7 Fix Python 3.10 (PEP-620) incompatibility. 2021-01-04 01:31:40 -05:00
Pat Riehecky 944fa075b3 Stop using deprecated API calls (python-3.9) #319 2020-10-15 21:54:47 -04:00
Austin Maliszewski 9e1132f4f5 Handle NULL from call to PyLong_Type
PyLong_Type raises an exception if the argument is not convertible to
long, therefore, this has to be handled as new_reference and not
new_non_null_reference, otherwise a segfault will occur.
2020-08-08 02:30:46 -04:00
Andrey Semashev 01ab510585 Removed usage of deprecated header boost/detail/iterator.hpp.
The header is deprecated in favor of <iterator>. It generates compiler
warnings and will be removed in a future release.
2020-08-07 18:09:31 -04:00
Edward Diener 5e2d55d801 Revert back to original, as __cdecl is fine with the Embarcadero C++ clang-based compilers. 2020-08-07 17:35:12 -04:00
Edward Diener 17886fc296 Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-08-07 17:35:12 -04:00
Julien Schueller 1727b67a5a detail/caller.hpp:127:2: error: extra ';' [-Wpedantic] 2019-06-01 19:07:40 -04:00
Nikita Kniazev 0b0c0536d6 The right hypot fix for MinGW 2019-03-26 15:56:03 -04:00
Owens 0d0cd711a7 Enable forward declaration of unwind_type() in msvc14.15 and later.
Name lookup in msvc has changed between 14.14 and 14.15 making it consistent with other compilers. Forward declaration of unwind_type() is now required as it is for other compilers.

Resolves compilation errors identified in:

https://github.com/boostorg/python/issues/228
2019-03-25 11:00:48 -04:00
Nikita Kniazev 1f1b9b6aef Fix hypot issue on MinGW 2019-03-23 20:37:35 -04:00
Nikita Kniazev 6bd6d71850 Fix -Wregister error on Clang in C++17 mode
Suppresses the warning on GCC, Clang, and MSVC.
2019-03-21 16:40:41 -04:00
Tom Kent 4b01139720 Ssize t warning - trac #3353 (#21)
Fixes msvc unsafe type conversion warning - trac num: 3353
2019-03-03 22:02:57 -05:00
SPKorhonen 65bfec2d97 Fix static object initialization under Visual Studio 2017 (#208)
Fix static object initialization under VS 15.7.2
2019-03-03 21:59:48 -05:00
Stefan Seefeld b4230e98f6 Fix auto-linking logic for boost_numpy (Windows only). 2018-06-04 09:34:00 -04:00
Stefan Seefeld 24313709a7 Fix auto-linking logic (Windows only). 2018-04-12 23:39:22 -04:00
Stefan Seefeld f3df1bf912 Remove redundant pragma once directives. 2018-04-07 17:05:18 -04:00
Stefan Seefeld d4d41d94ae Add Python version to library suffix. 2018-02-13 17:22:34 -05:00
Stefan Seefeld b9d0d97499 Fix MSVC compilation failure. 2017-11-16 10:26:30 -05:00
Stefan Seefeld 9ad3313d1f Fix deprecated elementwise comparison warning / error. 2017-11-07 19:43:16 -05:00
Stefan Seefeld bf9a03399b Revert "Avoid multiple template instances of boost::python::details::get_signature when multiple calling conventions are enabled"
This reverts commit b49a186b6f.
2017-10-30 08:04:01 -04:00
Stefan Seefeld 2d9871fc5a Fix unresolved symbol error with MSVC. 2017-10-27 13:58:56 -04:00