]> granicus.if.org Git - python/commitdiff
Squashed compiler warnings by adding casts, making sure prototypes are in
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 2002 21:03:36 +0000 (21:03 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 23 Dec 2002 21:03:36 +0000 (21:03 +0000)
scope and looking at types.

Modules/getpath.c
Modules/main.c
Python/dynload_next.c
Python/mactoolboxglue.c

index ee972713f457ff370e4a0f075651246b76e42731..54b57c7847e3bc400a9c0733dcd8e15a25eedef8 100644 (file)
@@ -421,7 +421,7 @@ calculate_path(void)
        */
     pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize"));
     /* Use dylib functions to find out where the framework was loaded from */
-    buf = NSLibraryNameForModule(pythonModule);
+    buf = (char *)NSLibraryNameForModule(pythonModule);
     if (buf != NULL) {
         /* We're in a framework. */
         /* See if we might be in the build directory. The framework in the
index 2005f0bb8789a0a5b0e9a6e0de29bb1c821e2bf8..ca382c69d3224b95ca114067bc2651bc5dd893a1 100644 (file)
@@ -13,6 +13,10 @@ extern PyObject* pyvms_gr_empty_string;
 #include <fcntl.h>
 #endif
 
+#if defined(WITH_NEXT_FRAMEWORK)
+#include "pymactoolbox.h"
+#endif
+
 #if (defined(PYOS_OS2) && !defined(PYCC_GCC)) || defined(MS_WINDOWS)
 #define PYTHONHOMEHELP "<prefix>\\lib"
 #else
index 0b232f120614aa4c4c28690c3bbb886db11d1d16..cf42cb7151b87b84e7dda5f188394839a419f5cc 100644 (file)
@@ -77,7 +77,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
                newModule = NSLinkModule(image, pathname, LINKOPTIONS);
                if (newModule == NULL) {
                        int errNo;
-                       char *fileName, *moreErrorStr;
+                       const char *fileName, *moreErrorStr;
                        NSLinkEditErrors c;
                        NSLinkEditError( &c, &errNo, &fileName, &moreErrorStr );
                        PyOS_snprintf(errBuf, 512, "Failure linking new module: %s: %s", 
index 6d39d57d513e3bbdac7fd90e1fa4c7255687ccb4..3dfd6991e598e05c429c94ff7bd7649aae9a606f 100644 (file)
@@ -53,7 +53,7 @@ char *PyMac_getscript()
         /* This leaks a an object. */
         name = CFStringConvertEncodingToIANACharSetName(enc);
     }
-    return CFStringGetCStringPtr(name, 0); 
+    return (char *)CFStringGetCStringPtr(name, 0); 
 #else
    int font, script, lang;
     font = 0;