This is an automated email from the ASF dual-hosted git repository. jking pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/thrift.git
commit 0f43f95b89db01a8c68225824f8aa7fd4522007e Author: cyy <cyye...@outlook.com> AuthorDate: Sat Jan 5 19:27:00 2019 +0800 revert noexcept changings --- lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp | 10 +++++----- lib/py/src/ext/types.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp index 019e2a7..63c8905 100644 --- a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp +++ b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp @@ -111,23 +111,23 @@ ZEND_GET_MODULE(thrift_protocol) class PHPExceptionWrapper : public std::exception { public: - PHPExceptionWrapper(zval* _ex) noexcept { + PHPExceptionWrapper(zval* _ex) throw() { ZVAL_COPY(&ex, _ex); snprintf(_what, 40, "PHP exception zval=%p", _ex); } - PHPExceptionWrapper(zend_object* _exobj) noexcept { + PHPExceptionWrapper(zend_object* _exobj) throw() { ZVAL_OBJ(&ex, _exobj); snprintf(_what, 40, "PHP exception zval=%p", _exobj); } - ~PHPExceptionWrapper() noexcept { + ~PHPExceptionWrapper() throw() { zval_dtor(&ex); } - const char* what() const noexcept { + const char* what() const throw() { return _what; } - operator zval*() const noexcept { + operator zval*() const throw() { return const_cast<zval*>(&ex); } // Zend API doesn't do 'const'... protected: diff --git a/lib/py/src/ext/types.h b/lib/py/src/ext/types.h index 84933f4..5cd8dda 100644 --- a/lib/py/src/ext/types.h +++ b/lib/py/src/ext/types.h @@ -89,19 +89,19 @@ public: if (obj_) Py_DECREF(obj_); } - PyObject* get() noexcept { return obj_; } + PyObject* get() throw() { return obj_; } operator bool() { return obj_; } - void reset(PyObject* py_object) noexcept { + void reset(PyObject* py_object) throw() { if (obj_) Py_DECREF(obj_); obj_ = py_object; } - PyObject* release() noexcept { + PyObject* release() throw() { PyObject* tmp = obj_; obj_ = NULL; return tmp; } - void swap(ScopedPyObject& other) noexcept { + void swap(ScopedPyObject& other) throw() { ScopedPyObject tmp(other.release()); other.reset(release()); reset(tmp.release());