[Python-checkins] r73004 - in python/trunk: Mac/Modules/carbonevt/_CarbonEvtmodule.c Mac/Modules/ctl/_Ctlmodule.c Modules/_ssl.c Modules/_struct.c Python/compile.c
jeffrey.yasskin
python-checkins at python.org
Fri May 29 05:44:31 CEST 2009
Author: jeffrey.yasskin
Date: Fri May 29 05:44:31 2009
New Revision: 73004
Log:
Fix nearly all compilation warnings under Apple gcc-4.0. Tested with OPT="-g
-Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
There's still a batch of non-prototype warnings in Xlib.h that I don't know how
to fix.
Modified:
python/trunk/Mac/Modules/carbonevt/_CarbonEvtmodule.c
python/trunk/Mac/Modules/ctl/_Ctlmodule.c
python/trunk/Modules/_ssl.c
python/trunk/Modules/_struct.c
python/trunk/Python/compile.c
Modified: python/trunk/Mac/Modules/carbonevt/_CarbonEvtmodule.c
==============================================================================
--- python/trunk/Mac/Modules/carbonevt/_CarbonEvtmodule.c (original)
+++ python/trunk/Mac/Modules/carbonevt/_CarbonEvtmodule.c Fri May 29 05:44:31 2009
@@ -27,12 +27,6 @@
PyObject *EventRef_New(EventRef itself);
/********** EventTypeSpec *******/
-static PyObject*
-EventTypeSpec_New(EventTypeSpec *in)
-{
- return Py_BuildValue("ll", in->eventClass, in->eventKind);
-}
-
static int
EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
{
@@ -67,12 +61,6 @@
/********** EventHotKeyID *******/
-static PyObject*
-EventHotKeyID_New(EventHotKeyID *in)
-{
- return Py_BuildValue("ll", in->signature, in->id);
-}
-
static int
EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
{
Modified: python/trunk/Mac/Modules/ctl/_Ctlmodule.c
==============================================================================
--- python/trunk/Mac/Modules/ctl/_Ctlmodule.c (original)
+++ python/trunk/Mac/Modules/ctl/_Ctlmodule.c Fri May 29 05:44:31 2009
@@ -1598,7 +1598,7 @@
{
PyObject *_res = NULL;
OSErr _err;
- SInt16 outValue;
+ UInt16 outValue;
#ifndef GetBevelButtonMenuValue
PyMac_PRECHECK(GetBevelButtonMenuValue);
#endif
Modified: python/trunk/Modules/_ssl.c
==============================================================================
--- python/trunk/Modules/_ssl.c (original)
+++ python/trunk/Modules/_ssl.c Fri May 29 05:44:31 2009
@@ -667,7 +667,7 @@
char buf[2048];
char *vptr;
int len;
- const unsigned char *p;
+ unsigned char *p;
if (certificate == NULL)
return peer_alt_names;
Modified: python/trunk/Modules/_struct.c
==============================================================================
--- python/trunk/Modules/_struct.c (original)
+++ python/trunk/Modules/_struct.c Fri May 29 05:44:31 2009
@@ -182,6 +182,7 @@
/* Same, but handling unsigned long */
+#ifndef PY_STRUCT_OVERFLOW_MASKING
static int
get_ulong(PyObject *v, unsigned long *p)
{
@@ -201,6 +202,7 @@
}
return 0;
}
+#endif /* PY_STRUCT_OVERFLOW_MASKING */
#ifdef HAVE_LONG_LONG
Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c (original)
+++ python/trunk/Python/compile.c Fri May 29 05:44:31 2009
@@ -535,18 +535,6 @@
}
-/* Allocate a new "anonymous" local variable.
- Used by list comprehensions and with statements.
-*/
-
-static PyObject *
-compiler_new_tmpname(struct compiler *c)
-{
- char tmpname[256];
- PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", ++c->u->u_tmpname);
- return PyString_FromString(tmpname);
-}
-
/* Allocate a new block and return a pointer to it.
Returns NULL on error.
*/
More information about the Python-checkins
mailing list