Issue 1713234: Fix warnings related to PyLong_FromVoidPtr (original) (raw)
Issue1713234
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/44930
classification
Title: | Fix warnings related to PyLong_FromVoidPtr | ||
---|---|---|---|
Type: | Stage: | ||
Components: | Interpreter Core | Versions: | Python 2.6 |
process
Status: | closed | Resolution: | |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | ocean-city, theller | |
Priority: | low | Keywords: | patch |
Created on 2007-05-05 02:35 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
fix_warning.patch | ocean-city,2007-05-05 02:35 |
Messages (3) | ||
---|---|---|
msg52597 - (view) | Author: Hirokazu Yamamoto (ocean-city) * ![]() |
Date: 2007-05-05 02:35 |
This is slight fix. PyLong_FromVoidPtr(void *) causes warning on Modules/_ctypes/callbacks.c (line 387) > PyObject *py_rclsid = PyLong_FromVoidPtr(rclsid); >>>> this gets rid of constness of void pointer | ||
msg52598 - (view) | Author: Thomas Heller (theller) * ![]() |
Date: 2007-05-05 16:38 |
The compiler warnings in Modules/_ctypes/callbacks.c are easily fixed by adding explicit casts: PyObject *py_rclsid = PyLong_FromVoidPtr((void *)rclsid); PyObject *py_riid = PyLong_FromVoidPtr((void *)riid); On the other hand, IMO it makes sense to change the signature of PyLong_FromVoidPtr to accept 'const void *' pointers. | ||
msg52599 - (view) | Author: Thomas Heller (theller) * ![]() |
Date: 2007-05-30 07:00 |
I added the explicit casts in the source code, that should make the warnings go away. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:24 | admin | set | github: 44930 |
2007-05-05 02:35:58 | ocean-city | create |