Skip to content

Commit

Permalink
export more c-api
Browse files Browse the repository at this point in the history
  • Loading branch information
songjhaha authored and thautwarm committed Jan 13, 2023
1 parent 91320dd commit 6747156
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TyPython/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TyPython"
uuid = "9c4566a2-237d-4c69-9a5e-9d27b7d0881b"
authors = ["thautwarm <[email protected]>"]
version = "0.2.3"
version = "0.2.4"

[deps]
IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
Expand Down
8 changes: 8 additions & 0 deletions TyPython/src/CPython.APIs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ mutable struct PythonAPIStruct
PyUnicode_FromString::cfunc_t(Cstring, Except(Py_NULLPTR, C.Ptr{PyObject})) # except NULL
PyUnicode_AsUTF8AndSize::cfunc_t(C.Ptr{PyObject}, Ptr{Py_ssize_t}, Except(C_NULL, Ptr{Cchar}))
PyUnicode_FromStringAndSize::cfunc_t(Cstring, Py_ssize_t, Except(Py_NULLPTR, C.Ptr{PyObject})) # except NULL
PyBytes_FromStringAndSize::cfunc_t(C.Ptr{Cchar}, Py_ssize_t, Except(Py_NULLPTR, C.Ptr{PyObject})) # except NULL
PyBytes_AsStringAndSize::cfunc_t(C.Ptr{PyObject}, Ptr{Ptr{Cchar}}, Ptr{Py_ssize_t}, Except(-1, Cint)) # except -1
PyErr_Print::cfunc_t(Cvoid) # no except
PyErr_Occurred::cfunc_t(C.Ptr{PyObject}) # not set -> NULL
PyErr_SetString::cfunc_t(C.Ptr{PyObject}, Cstring, Cvoid) # no except
Expand All @@ -105,11 +107,17 @@ mutable struct PythonAPIStruct
PyDict_New::cfunc_t(Except(Py_NULLPTR, C.Ptr{PyObject})) # except NULL
PyDict_SetItem::cfunc_t(C.Ptr{PyObject}, C.Ptr{PyObject}, C.Ptr{PyObject}, Except(-1, Cint)) # except -1
PyDict_Type::C.Ptr{PyObject}
PyDict_Size::cfunc_t(C.Ptr{PyObject}, Py_ssize_t)
PyDict_Keys::cfunc_t(C.Ptr{PyObject}, C.Ptr{PyObject})
PyDict_Values::cfunc_t(C.Ptr{PyObject}, C.Ptr{PyObject})
PyList_GetItem::cfunc_t(C.Ptr{PyObject}, Py_ssize_t, Except(Py_NULLPTR, C.Ptr{PyObject}))

PyLong_Type::C.Ptr{PyObject}
PyFloat_Type::C.Ptr{PyObject}
PyComplex_Type::C.Ptr{PyObject}
PyTuple_Type::C.Ptr{PyObject}
PyType_Ready::cfunc_t(C.Ptr{PyObject}, Cint) # except -1
PyType_IsSubtype::cfunc_t(C.Ptr{PyObject}, C.Ptr{PyObject}, Cint)

PyLong_AsLongLong::cfunc_t(C.Ptr{PyObject}, Clonglong) # except -1 ana error occurred
PyLong_FromLongLong::cfunc_t(Clonglong, Except(Py_NULLPTR, C.Ptr{PyObject})) # except -1 ana error occurred
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "julia-numpy"
version = "0.4.5"
version = "0.4.6"
description = "Writing Python C extensions in Julia within 5 minutes."
authors = ["thautwarm <[email protected]>"]
maintainers = ["songjhaha <[email protected]>"]
Expand Down

2 comments on commit 6747156

@songjhaha
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=TyPython

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/75613

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a TyPython-v0.2.4 -m "<description of version>" 67471561813bb9d0acd78cf157521789f7b0c62a
git push origin TyPython-v0.2.4

Please sign in to comment.