Skip to content

Fixed a bug with C++ comparison operators#3361

Merged
scoder merged 1 commit intocython:masterfrom
da-woods:fix_cpp_operator_check
Feb 18, 2020
Merged

Fixed a bug with C++ comparison operators#3361
scoder merged 1 commit intocython:masterfrom
da-woods:fix_cpp_operator_check

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.

2 participants