Skip to content

Commit

Permalink
Fix Py_None increment bug #270
Browse files Browse the repository at this point in the history
  • Loading branch information
mducle authored and ajjackson committed May 30, 2023
1 parent 51cb4e7 commit ffb428f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

- Allow ``color`` to be passed as an extra kwarg to ``plot_1d`` and
``plot_1d_to_axis``. Previously this caused a ``TypeError``.
- Fix bug where ``Py_None`` was not incremented before returning from
``calculate_phonons()`` in the C-extension causing a deallocation crash

`v1.2.0 <https://github.com/pace-neutrons/Euphonic/compare/v1.1.0...v1.2.0>`_
------
Expand Down
2 changes: 1 addition & 1 deletion c/_euphonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static PyObject *calculate_phonons(PyObject *self, PyObject *args) {
Py_DECREF(py_dipole_init_data);
}

return Py_None;
Py_RETURN_NONE;
}

static PyMethodDef _euphonic_methods[] = {
Expand Down

0 comments on commit ffb428f

Please sign in to comment.