colnotab / cpython

The Python programming language
https://www.python.org/
Other
0 stars 0 forks source link

Fix build warnings and failure in test_code #5

Closed ammaraskar closed 3 years ago

ammaraskar commented 3 years ago

Fix build warnings on windows:

codeobject.c(808,48): warning C4133: 'function': incompatible types - from 'PyBytesObject *' to
'PyObject  *'

codeobject.c(1472,1): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible
loss  of data

and a test failure in test_code.py:

test test_code failed -- Traceback (most recent call last):
  File "C:\Users\ammar\workspace\cpython\lib\test\test_code.py", line 216, in test_constructor
    return CodeType(co.co_argcount,
TypeError: code() argument 16 must be bytes, not tuple