diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-05 10:31:52 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-09-05 10:31:52 (GMT) |
commit | fd064863ebbe90adc24c60df4c3dbf630ec3a6c4 (patch) | |
tree | 60d77f56f209d3909b275d760bb4aedc9bd1d243 /Mac/Modules/win | |
parent | 5a1516bce5c9aa6f957f1e93ba85d143d8eac03a (diff) | |
download | cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.zip cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.gz cpython-fd064863ebbe90adc24c60df4c3dbf630ec3a6c4.tar.bz2 |
Shut up many more gcc warnings.
Diffstat (limited to 'Mac/Modules/win')
-rw-r--r-- | Mac/Modules/win/_Winmodule.c | 9 | ||||
-rw-r--r-- | Mac/Modules/win/winsupport.py | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index 5d597ac..13ebe20 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -5,8 +5,12 @@ +#ifdef _WIN32 +#include "pywintoolbox.h" +#else #include "macglue.h" #include "pymactoolbox.h" +#endif /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ @@ -2125,7 +2129,7 @@ static int WinObj_compare(WindowObject *self, WindowObject *other) static PyObject * WinObj_repr(WindowObject *self) { char buf[100]; - sprintf(buf, "<Window object at 0x%08.8x for 0x%08.8x>", self, self->ob_itself); + sprintf(buf, "<Window object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself); return PyString_FromString(buf); } @@ -2643,7 +2647,8 @@ static PyObject *Win_WhichWindow(PyObject *_self, PyObject *_args) if ( !PyArg_ParseTuple(_args, "i", &ptr) ) return NULL; - return WinObj_WhichWindow((WindowPtr)ptr); + _res = WinObj_WhichWindow((WindowPtr)ptr); + return _res; } diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py index 5bb5bda..8a38b97 100644 --- a/Mac/Modules/win/winsupport.py +++ b/Mac/Modules/win/winsupport.py @@ -179,7 +179,7 @@ class MyObjectDefinition(GlobalObjectDefinition): Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype) OutLbrace() Output("char buf[100];") - Output("""sprintf(buf, "<Window object at 0x%%08.8x for 0x%%08.8x>", self, self->ob_itself);""") + Output("""sprintf(buf, "<Window object at 0x%%8.8x for 0x%%8.8x>", (unsigned)self, (unsigned)self->ob_itself);""") Output("return PyString_FromString(buf);") OutRbrace() @@ -208,7 +208,8 @@ long ptr; if ( !PyArg_ParseTuple(_args, "i", &ptr) ) return NULL; -return WinObj_WhichWindow((WindowPtr)ptr); +_res = WinObj_WhichWindow((WindowPtr)ptr); +return _res; """ f = ManualGenerator("WhichWindow", whichwin_body) |