[pygobject/llvm: 4/12] Get rid of a couple of C++ warning



commit b233d4a589d6a9b603cbfba02963912651892ca9
Author: Johan Dahlin <johan gnome org>
Date:   Mon Jul 5 20:11:33 2010 -0300

    Get rid of a couple of C++ warning
    
    g++ warns if you send in a static string to a function
    expecting a char* and not a const char*

 gi/pygi.h               |    2 +-
 gi/pygobject-external.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygi.h b/gi/pygi.h
index 0996fe0..c8ebaf9 100644
--- a/gi/pygi.h
+++ b/gi/pygi.h
@@ -79,7 +79,7 @@ _pygi_import (void)
         return 1;
     }
 
-    PyGI_API = (struct PyGI_API*) PyCObject_Import("gi", "_API");
+    PyGI_API = (struct PyGI_API*) PyCObject_Import((char*)"gi", (char*)"_API");
     if (PyGI_API == NULL) {
         return -1;
     }
diff --git a/gi/pygobject-external.h b/gi/pygobject-external.h
index 00b8b6f..80f1a38 100644
--- a/gi/pygobject-external.h
+++ b/gi/pygobject-external.h
@@ -50,7 +50,7 @@ _pygobject_import (void)
         return -1;
     }
 
-    module = PyImport_ImportModuleEx ("gobject", NULL, NULL, from_list);
+    module = PyImport_ImportModuleEx ((char*)"gobject", NULL, NULL, from_list);
 
     Py_DECREF (from_list);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]