yuja added a comment.

  >   In this case, I suspect something really weird because `PyInt_AS_LONG()` 
doesn't exist on Python 3 and the docs for Python 2 say it performs no error 
checking. So the fact that it is setting an exception on Python 3 causes me to 
raise an eyebrow.
  
  It's `#define PyLong_AS_LONG(op) PyLong_AsLong(op)`, sigh. And the reason
  of the lack of `PyLong_AS_LONG(op)` would be that Python 3 has no bounded
  integer type.
  
    +   if (PyInt_Check(value)) {
    +           long arg = PyInt_AS_LONG(value);
  
  In this case, we'll probably have to replace `PyInt_Check() + PyInt_AS_LONG()`
  with `PyInt_AsLong() + PyErr_Occurred()`.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5224

To: durin42, #hg-reviewers, indygreg
Cc: yuja, indygreg, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to