Skip to content

Commit

Permalink
Release simuPOP 1.1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
BoPeng committed Sep 9, 2024
1 parent 06efb6e commit 5b6225d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ The user guide and reference manual of simuPOP is available at http://bopeng.git

## Change Log since 1.1.7

### simuPOP 1.1.17
* Fix compatibility with Python 3.13 and latest version of Xcode on mac.

### simuPOP 1.1.16
* [#103](https://github.com/BoPeng/simuPOP/issues/103) Fix compatibility with recent compilers with c++17 support, and fix conda-forge release.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def is_maverick():
# versions are not available, and will most likely work just fine.
boost_versions = ['1_35_0', '1_36_0', '1_37_0', '1_38_0', '1_39_0', '1_40_0',
'1_42_0', '1_43_0', '1_44_0', '1_45_0', '1_46_0', '1_46_1', '1_47_0',
'1_48_0', '1_62_0', '1_72_0', '1_74_0']
'1_48_0', '1_62_0', '1_72_0', '1_74_0', '1_86_0']
invalid_boost_versions = ['1_41_0', '1_71_0']

included_version = [x for x in boost_versions if os.path.isdir('boost_' + x)]
Expand Down
4 changes: 2 additions & 2 deletions src/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__="1.1.16"
__revision__="4681"
__version__="1.1.17"
__revision__="4682"
10 changes: 3 additions & 7 deletions src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3178,20 +3178,16 @@ void StreamProvider::closeOstream()
"Passed function object is invalid");
string str = dynamic_cast<ostringstream *>(m_filePtr)->str();
// in swingpyrun.h, the PyString_Check is defined to PyBytes_Check
#if PY_VERSION_HEX >= 0x03000000
PyObject * arglist = NULL;
PyObject * pyResult = NULL;
if (m_mode == "b") {
arglist = Py_BuildValue("(S)", PyBytes_FromString(str.c_str()));
pyResult = PyEval_CallObject(m_func.func(), arglist);
pyResult = PyObject_CallObject(m_func.func(), arglist);
} else {
arglist = Py_BuildValue("(s)", str.c_str());
pyResult = PyEval_CallObject(m_func.func(), arglist);
pyResult = PyObject_CallObject(m_func.func(), arglist);
}
#else
PyObject * arglist = Py_BuildValue("(s)", str.c_str());
PyObject * pyResult = PyEval_CallObject(m_func.func(), arglist);
#endif

if (pyResult == NULL) {
PyErr_Print();
PyErr_Clear();
Expand Down
8 changes: 4 additions & 4 deletions src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class pyFunc
va_start(argptr, format);
PyObject * arglist = Py_VaBuildValue(const_cast<char *>(format), argptr);
va_end(argptr);
PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist);
PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist);

Py_XDECREF(arglist);
if (pyResult == NULL) {
Expand All @@ -394,7 +394,7 @@ class pyFunc
template <typename T>
T operator()(void converter(PyObject *, T &), PyObject * arglist) const
{
PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist);
PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist);

if (pyResult == NULL) {
PyErr_Print();
Expand All @@ -415,7 +415,7 @@ class pyFunc
va_start(argptr, format);
PyObject * arglist = Py_VaBuildValue(const_cast<char *>(format), argptr);
va_end(argptr);
PyObject * pyResult = PyEval_CallObject(m_func.object(), arglist);
PyObject * pyResult = PyObject_CallObject(m_func.object(), arglist);

Py_XDECREF(arglist);
if (pyResult == NULL) {
Expand All @@ -429,7 +429,7 @@ class pyFunc

PyObject * operator()(PyObject * args) const
{
PyObject * pyResult = PyEval_CallObject(m_func.object(), args);
PyObject * pyResult = PyObject_CallObject(m_func.object(), args);

if (pyResult == NULL) {
PyErr_Print();
Expand Down

0 comments on commit 5b6225d

Please sign in to comment.