Skip to content

Commit 3cf7b22

Browse files
generating CPython related function declarations in python_bind pass
1 parent a3bca79 commit 3cf7b22

File tree

4 files changed

+248
-175
lines changed

4 files changed

+248
-175
lines changed

integration_tests/bindpy_05.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def PyObject_CallObject(a: CPtr, b: CPtr) -> CPtr:
4141
pass
4242

4343
@ccall(header="Python.h")
44-
def PyLong_AsLongLong(a: CPtr) -> i32:
44+
def PyLong_AsLongLong(a: CPtr) -> i64:
4545
pass
4646

4747
def my_f():
@@ -62,9 +62,9 @@ def my_f():
6262
_Py_DecRef(pArgs)
6363
assert bool(pValue), "Call to my_f failed\n"
6464

65-
ans: i32 = PyLong_AsLongLong(pValue)
65+
ans: i64 = PyLong_AsLongLong(pValue)
6666
print("Ans is", ans)
67-
assert ans == 5
67+
assert ans == i64(5)
6868

6969

7070
def main0():

0 commit comments

Comments
 (0)