Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Py*_Check Methods in JavaCPP Preset for CPython #1493

Open
mmanco opened this issue Apr 15, 2024 · 1 comment
Open

Missing Py*_Check Methods in JavaCPP Preset for CPython #1493

mmanco opened this issue Apr 15, 2024 · 1 comment

Comments

@mmanco
Copy link
Contributor

mmanco commented Apr 15, 2024

I am currently working on a project using the JavaCPP Preset for CPython. I am trying to check the type of a PyObject, but it appears that the Py*_Check methods (such as PyLong_Check, PyFloat_Check, etc.) are not available in the preset.

These methods are integral to the Python C API and are commonly used to ascertain the type of a PyObject. They are essential for my project as I need to handle different types of PyObjects differently.

Currently, I am using the following workaround, but the presence of those check macros would be beneficial and would ensure the completeness of the preset:

PyType_IsSubtype(Py_TYPE(value), PyFloat_Type())

Preset used: org.bytedeco:cpython-platform:3.12.1-1.5.10

@saudet
Copy link
Member

saudet commented Apr 15, 2024

Contributions are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants