[Patches] fix simple 64-bit warnings/errors in signalmodule.c and bufferobject.c
Trent Mick
trentm@activestate.com
Mon, 5 Jun 2000 18:46:42 -0700
On Mon, Jun 05, 2000 at 05:46:31PM -0700, Greg Stein wrote:
> These casts should not be required. NULL is "all types" ... why the cast?
>
> Cheers,
> -g
>
> > *** /home/trentm/main/contrib/python/dist/src/Objects/bufferobject.c Fri Jun 2 11:21:14 2000
> > --- /home/trentm/main/Apps/Perlium/Python/dist/src/Objects/bufferobject.c Fri Jun 2 15:53:43 2000
> > ***************
> > *** 166,172 ****
> > void *ptr;
> > int size;
> > {
> > ! return _PyBuffer_FromMemory(NULL, ptr, size, 1);
> > }
> >
> > PyObject *
> > --- 166,172 ----
> > void *ptr;
> > int size;
> > {
> > ! return _PyBuffer_FromMemory((PyObject*)NULL, ptr, size, 1);
> > }
> >
> > PyObject *
Intel's Win64 compiler output:
"c:\ia64xdevsdk\bin\Intel64\ecl.exe" -nologo -W3 -GX -Fp".\ia64-temp-release\python16\python16.pch" -YX -Zi -Fd".\ia64-temp-release\python16\\" -Fo".\ia64-temp-release\python16\\" -DWIN32 -Wp64 -Ap64 -DWIN64 -D_WIN64 -FD -c -Od -MD -DNDEBUG -Ic:\ia64xdevsdk\include -Ic:\ia64xdevsdk\include\sys -Ic:\ia64xdevsdk\include\gl -Ic:\ia64xdevsdk\include\mfc -Ic:\ia64xdevsdk\include\atl\include -DDEBUGGING -I"..\Include" -I"..\PC" -DUSE_DL_EXPORT -D_WINDOWS ..\Objects\bufferobject.c
bufferobject.c
..\Objects\bufferobject.c(169) : warning #180: argument is incompatible with formal parameter
return _PyBuffer_FromMemory(NULL, ptr, size, 1);
^
Adding the cast to a PyObject* gets rid of the warning. Perhaps I am
overreacting to an innocuous warning?
Trent
--
Trent Mick
trentm@activestate.com