Skip to content

Commit 5666148

Browse files
committed
Update to symengine v0.2.0
1 parent b06ad6c commit 5666148

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
22
project(python_wrapper)
33

44
set(CMAKE_PREFIX_PATH ${SymEngine_DIR} ${CMAKE_PREFIX_PATH})
5-
find_package(SymEngine 0.1.0 REQUIRED CONFIG
5+
find_package(SymEngine 0.2.0 REQUIRED CONFIG
66
PATH_SUFFIXES lib/cmake/symengine cmake/symengine CMake/)
77
message("SymEngine_DIR : " ${SymEngine_DIR})
88
set(CMAKE_BUILD_TYPE ${SYMENGINE_BUILD_TYPE})

symengine/lib/pywrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PyNumber::PyNumber(PyObject* pyobject, const RCP<const PyModule> &pymodule) :
2727
pyobject_(pyobject), pymodule_(pymodule) {
2828
}
2929

30-
std::size_t PyNumber::__hash__() const {
30+
hash_t PyNumber::__hash__() const {
3131
return PyObject_Hash(pyobject_);
3232
}
3333

@@ -210,7 +210,7 @@ int PyFunctionClass::compare(const PyFunctionClass &x) const {
210210
return PyObject_RichCompareBool(pyobject_, x.pyobject_, Py_LT) == 1 ? 1 : -1;
211211
}
212212

213-
std::size_t PyFunctionClass::hash() const {
213+
hash_t PyFunctionClass::hash() const {
214214
if (hash_ == 0)
215215
hash_ = PyObject_Hash(pyobject_);
216216
return hash_;
@@ -250,7 +250,7 @@ RCP<const Basic> PyFunction::diff_impl(const RCP<const Symbol> &s) const {
250250
return pyfunction_class_->get_py_module()->diff_(pyobject_, s);
251251
}
252252

253-
std::size_t PyFunction::__hash__() const {
253+
hash_t PyFunction::__hash__() const {
254254
return PyObject_Hash(pyobject_);
255255
}
256256

symengine/lib/symengine/pywrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class PyNumber : public NumberWrapper {
102102
virtual std::string __str__() const;
103103
virtual int compare(const Basic &o) const;
104104
virtual bool __eq__(const Basic &o) const;
105-
virtual std::size_t __hash__() const;
105+
virtual hash_t __hash__() const;
106106
};
107107

108108
/*! Class to represent the parent class for a PyFunction. Stores
@@ -117,7 +117,7 @@ class PyFunctionClass : public EnableRCPFromThis<PyFunctionClass> {
117117
//! Name of the function
118118
std::string name_;
119119
//! Hash of the python function
120-
mutable size_t hash_;
120+
mutable hash_t hash_;
121121
//! PyModule that this python function belongs to
122122
RCP<const PyModule> pymodule_;
123123
public:
@@ -129,7 +129,7 @@ class PyFunctionClass : public EnableRCPFromThis<PyFunctionClass> {
129129
PyObject* call(const vec_basic &vec) const;
130130
bool __eq__(const PyFunctionClass &x) const;
131131
int compare(const PyFunctionClass &x) const;
132-
std::size_t hash() const;
132+
hash_t hash() const;
133133
};
134134

135135
/*! Class to represent the parent class for a PyFunction. Stores
@@ -158,7 +158,7 @@ class PyFunction : public FunctionWrapper {
158158
virtual RCP<const Basic> diff_impl(const RCP<const Symbol> &x) const;
159159
virtual int compare(const Basic &o) const;
160160
virtual bool __eq__(const Basic &o) const;
161-
virtual std::size_t __hash__() const;
161+
virtual hash_t __hash__() const;
162162
};
163163

164164
}

symengine_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
253bf6b393cdb6207551dd1525ec6ba0cc4ab5eb
1+
v0.2.0

0 commit comments

Comments
 (0)