Skip to content

Commit

Permalink
generating CPython related function declarations in python_bind pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa committed Aug 11, 2024
1 parent a3bca79 commit 3cf7b22
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 175 deletions.
6 changes: 3 additions & 3 deletions integration_tests/bindpy_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def PyObject_CallObject(a: CPtr, b: CPtr) -> CPtr:
pass

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

def my_f():
Expand All @@ -62,9 +62,9 @@ def my_f():
_Py_DecRef(pArgs)
assert bool(pValue), "Call to my_f failed\n"

ans: i32 = PyLong_AsLongLong(pValue)
ans: i64 = PyLong_AsLongLong(pValue)
print("Ans is", ans)
assert ans == 5
assert ans == i64(5)


def main0():
Expand Down
Loading

0 comments on commit 3cf7b22

Please sign in to comment.