[ python-Patches-1713234 ] Fix warnings related to PyLong_FromVoidPtr

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.patches
Message-ID <[email protected]>
Patches item #1713234, was opened at 2007-05-05 04:35
Message generated for change (Comment added) made by theller
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1713234&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.6
>Status: Closed
Resolution: None
Priority: 3
Private: No
Submitted By: Hirokazu Yamamoto (ocean-city)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix warnings related to PyLong_FromVoidPtr

Initial Comment:
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


----------------------------------------------------------------------

>Comment By: Thomas Heller (theller)
Date: 2007-05-30 09:00

Message:
Logged In: YES 
user_id=11105
Originator: NO

I added the explicit casts in the source code, that should make the
warnings go away.

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2007-05-05 18:38

Message:
Logged In: YES 
user_id=11105
Originator: NO

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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1713234&group_id=5470
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.