pybind11/docs
Tim Stumbaugh cca4c51ca4
Update errors in string "Explicit conversions" docs (#4658)
`PyUnicode_DecodeLatin1` requires you to pass in the `error`
parameter. The code as it is in the docs didn't compile.

There is a reference leak in the example
code. `PyUnicode_DecodeLatin1` returns a new reference. Calling
`py::str(PyObject*)` calls `PyObject_Str`, which also returns a new
reference. That reference is managed by the `py::str`
constructor (which correctly steals the reference, using the
`stolen_t` constructor), but the original reference returned by
`PyUnicode_DecodeLatin1` is never decref'd: it never makes it into an
`object`, and it's never manually decremented.

This fixes both of those issues. The code compiles, and I viewed the
sphinx docs locally.
2023-05-09 07:04:20 -07:00
..
_static/css docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
advanced Update errors in string "Explicit conversions" docs (#4658) 2023-05-09 07:04:20 -07:00
cmake fix: find_import didn't work properly for classic tools (#2550) 2020-10-05 15:31:00 -04:00
basics.rst Dropping MSVC 2015 (#3722) 2022-02-14 11:36:22 -08:00
benchmark.py chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00
benchmark.rst ci: GHA basic format & pre-commit (#2309) 2020-07-20 13:35:21 -04:00
changelog.rst docs: changelog for 2.10.4 (#4532) 2023-03-16 16:01:28 -04:00
classes.rst Use std::hash<std::type_index>, std::equal_to<std::type_index> everywhere **except when libc++ is in use** (#4319) 2023-04-25 14:03:24 -07:00
compiling.rst Docs: No Strip in Debug (#3779) 2022-03-17 11:21:28 -07:00
conf.py chore: move to Ruff and add rules (#4483) 2023-02-22 06:18:55 -08:00
Doxyfile Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 2022-02-10 18:28:08 -08:00
faq.rst Dropping MSVC 2015 (#3722) 2022-02-14 11:36:22 -08:00
index.rst fix: chapters in PDF again (#2606) 2020-10-18 14:31:28 -04:00
installing.rst docs: add a note about compiling the example (#2737) 2020-12-24 09:51:36 -05:00
limitations.rst docs: reduce visibility of 3.9.0 warning (#3105) 2021-07-15 15:01:13 -04:00
Makefile took a stab at some documentation 2015-10-13 03:16:44 +02:00
pybind11_vs_boost_python1.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python1.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11_vs_boost_python2.png documentation improvements 2016-04-28 15:32:07 +02:00
pybind11_vs_boost_python2.svg Much more efficient generation of function signatures, updated docs 2016-01-17 22:31:15 +01:00
pybind11-logo.png docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
reference.rst feat: reapply fixed version of #3271 (#3293) 2021-09-23 15:06:07 -04:00
release.rst docs: touch up manual release suggestion (#3422) 2021-11-05 22:48:27 -04:00
requirements.txt docs: use Furo (#3109) 2022-07-13 10:13:35 -05:00
upgrade.rst chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00