File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -694,7 +694,11 @@ PyLong_AsLongLong(PyObject *vv)
694694 (PyLongObject * )vv , (unsigned char * )& bytes ,
695695 SIZEOF_LONG_LONG , IS_LITTLE_ENDIAN , 1 );
696696
697- return res < 0 ? (LONG_LONG )res : bytes ;
697+ /* Plan 9 can't handle LONG_LONG in ? : expressions */
698+ if (res < 0 )
699+ return (LONG_LONG )res ;
700+ else
701+ return bytes ;
698702}
699703
700704/* Get a C unsigned LONG_LONG int from a long int object.
@@ -716,7 +720,11 @@ PyLong_AsUnsignedLongLong(PyObject *vv)
716720 (PyLongObject * )vv , (unsigned char * )& bytes ,
717721 SIZEOF_LONG_LONG , IS_LITTLE_ENDIAN , 0 );
718722
719- return res < 0 ? (unsigned LONG_LONG )res : bytes ;
723+ /* Plan 9 can't handle LONG_LONG in ? : expressions */
724+ if (res < 0 )
725+ return (unsigned LONG_LONG )res ;
726+ else
727+ return bytes ;
720728}
721729
722730#undef IS_LITTLE_ENDIAN
You can’t perform that action at this time.
0 commit comments