Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug with C++ comparison operators #3361

Merged
merged 1 commit into from Feb 18, 2020

Conversation

da-woods
Copy link
Contributor

They'd generate two calls - one exception checked and one not


return c1 < c1

currently translates to

try {
    __pyx_t_1 = (__pyx_v_c1 < __pyx_v_c1);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(0, 27, __pyx_L1_error)
  }
  __pyx_t_1 = (__pyx_v_c1 < __pyx_v_c1);

i.e. it does the comparison twice, and doesn't check for exceptions on the second one.

They'd generate two calls - one exception checked and one not
@scoder scoder added this to the 0.29.16 milestone Feb 18, 2020
@scoder
Copy link
Contributor

scoder commented Feb 18, 2020

LGTM. I'll wait for travis to be happy and then merge and cherry-pick into 0.29.x.

@scoder scoder merged commit 66acbe4 into cython:master Feb 18, 2020
scoder pushed a commit that referenced this pull request Feb 18, 2020
They'd generate two calls - one exception checked and one not
@da-woods da-woods deleted the fix_cpp_operator_check branch March 31, 2020 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants