| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| cast | ||
| pycpp | ||
| classes.rst | ||
| embedding.rst | ||
| exceptions.rst | ||
| functions.rst | ||
| misc.rst | ||
| smart_ptrs.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 |
|---|---|---|
| .. | ||
| cast | Loading commit data... | |
| pycpp | Loading commit data... | |
| classes.rst | Loading commit data... | |
| embedding.rst | Loading commit data... | |
| exceptions.rst | Loading commit data... | |
| functions.rst | Loading commit data... | |
| misc.rst | Loading commit data... | |
| smart_ptrs.rst | Loading commit data... |