| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| chrono.rst | ||
| custom.rst | ||
| eigen.rst | ||
| functional.rst | ||
| index.rst | ||
| overview.rst | ||
| stl.rst | ||
| strings.rst |
`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.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| chrono.rst | Loading commit data... | |
| custom.rst | Loading commit data... | |
| eigen.rst | Loading commit data... | |
| functional.rst | Loading commit data... | |
| index.rst | Loading commit data... | |
| overview.rst | Loading commit data... | |
| stl.rst | Loading commit data... | |
| strings.rst | Loading commit data... |