diff options
| author | Jason Madden <jamadden@gmail.com> | 2021-10-28 15:17:45 -0500 |
|---|---|---|
| committer | Jason Madden <jamadden@gmail.com> | 2021-10-28 15:17:45 -0500 |
| commit | b8dc93f55c3b754f1f12626b1b6b7df313f94244 (patch) | |
| tree | 43bdcbc7fe0971451ec2a694b8729a373af64cd3 | |
| parent | 58ad6e09f7209dc97f5e30b3c0ceacdc2fe2a649 (diff) | |
| download | greenlet-b8dc93f55c3b754f1f12626b1b6b7df313f94244.tar.gz | |
Sprinkle in some more noexcept.
| -rwxr-xr-x | setup.py | 2 | ||||
| -rw-r--r-- | src/greenlet/greenlet.cpp | 8 | ||||
| -rw-r--r-- | src/greenlet/platform/switch_x86_msvc.h | 2 |
3 files changed, 6 insertions, 6 deletions
@@ -52,7 +52,7 @@ elif sys.platform == 'win32': # /EHsc is suggested, as /EHa isn't supposed to be linked to other things not built # with it. # See https://docs.microsoft.com/en-us/cpp/build/reference/eh-exception-handling-model?view=msvc-160 - handler = "/EHs" + handler = "/EHsc" cpp_compile_args.append(handler) def readfile(filename): diff --git a/src/greenlet/greenlet.cpp b/src/greenlet/greenlet.cpp index 9f373e4..b82002e 100644 --- a/src/greenlet/greenlet.cpp +++ b/src/greenlet/greenlet.cpp @@ -936,7 +936,7 @@ public: return this->args || this->kwargs; } - inline void slp_restore_state() + inline void slp_restore_state() G_NOEXCEPT { const OwnedGreenlet& g(target); PyGreenlet* owner(this->thread_state.borrow_current()); @@ -961,7 +961,7 @@ public: g->stack_prev = owner; } - inline int slp_save_state(char* stackref) + inline int slp_save_state(char* stackref) G_NOEXCEPT { /* must free all the C stack up to target_stop */ const char* const target_stop = target->stack_stop; @@ -1113,7 +1113,7 @@ protected: // subclass). // Returns the previous greenlet we just switched away from. - virtual OwnedGreenlet g_switchstack_success() + virtual OwnedGreenlet g_switchstack_success() G_NOEXCEPT { PyThreadState* tstate = PyThreadState_GET(); tstate->recursion_depth = this->target->recursion_depth; @@ -1561,7 +1561,7 @@ XXX: The above is outdated; rewrite. } } - OwnedObject g_switch_finish(const switchstack_result_t& err) G_NOEXCEPT + OwnedObject g_switch_finish(const switchstack_result_t& err) { cerr << "g_switch_finish 1" << endl; diff --git a/src/greenlet/platform/switch_x86_msvc.h b/src/greenlet/platform/switch_x86_msvc.h index 692c174..e903e0f 100644 --- a/src/greenlet/platform/switch_x86_msvc.h +++ b/src/greenlet/platform/switch_x86_msvc.h @@ -28,7 +28,7 @@ #ifdef SLP_EVAL -#define STACK_MAGIC 1 +#define STACK_MAGIC 0 /* Some magic to quell warnings and keep slp_switch() from crashing when built with VC90. Disable global optimizations, and the warning: frame pointer |
