]> granicus.if.org Git - python/commitdiff
Added include guards and C++ extern "C" {} constructs. Partial fix for #607253.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 10 Sep 2002 12:32:47 +0000 (12:32 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 10 Sep 2002 12:32:47 +0000 (12:32 +0000)
Bugfix candidate.

Include/pymactoolbox.h
Mac/Include/getapplbycreator.h
Mac/Include/macdefs.h
Mac/Include/macglue.h
Mac/Include/pythonresources.h

index 5e2bb34ea32d3f24a44503c1ce8912429993cf1c..16f73523f1627666e11b6cd03144990ad0545fc2 100644 (file)
@@ -1,7 +1,8 @@
 /*
 ** pymactoolbox.h - globals defined in mactoolboxglue.c
 */
-
+#ifndef Py_PYMACTOOLBOX_H
+#define Py_PYMACTOOLBOX_H
 #ifdef __cplusplus
        extern "C" {
 #endif
@@ -197,3 +198,4 @@ extern int OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
 #ifdef __cplusplus
        }
 #endif
+#endif
index 62e5930ca62584fcf8a4225d3e76d2d33904b51a..535be160579bfec2195dbf9aa415effce233f2b2 100644 (file)
@@ -21,6 +21,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ******************************************************************/
+#ifndef Py_GETAPPLBYCREATOR_H
+#define Py_GETALLPBYCREATOR_H
 
 #ifdef WITHOUT_FRAMEWORKS
 #include <Types.h>
@@ -29,4 +31,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <Carbon/Carbon.h>
 #endif
 
+#ifdef __cplusplus
+       extern "C" {
+#endif
+
 extern OSErr FindApplicationFromCreator(OSType, FSSpecPtr);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 409c2535c5c9bf5f4faff31782bc743ced35a9c7..df7d6f74b4eeae23d5ee3207496c699d4db211c4 100644 (file)
@@ -2,6 +2,8 @@
    look-alike file system access functions on the Macintosh.
    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
 */
+#ifndef Py_MACDEFS_H
+#define Py_MACDEFS_H
 
 #include <Types.h>
 #include <Files.h>
 #include <TextUtils.h>
 #endif
 
+#ifdef __cplusplus
+       extern "C" {
+#endif
+
 /* We may be able to use a std routine in think, don't know */
 extern unsigned char *Pstring(char *);
 extern char *getbootvol(void);
@@ -33,3 +39,8 @@ extern int sync(void);
 #endif
 #define EOS '\0'
 #define SEP ':'
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 3e57cd476eeec3fd35aecdcbee966762d04ec0c1..170de35d5863f88b850bdb06836b0a7b395ebc31 100644 (file)
@@ -21,7 +21,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ******************************************************************/
-
+#ifndef Py_MACGLUE_H
+#define Py_MACGLUE_H
 #ifdef WITHOUT_FRAMEWORKS
 #include <Types.h>
 #include <Files.h>
@@ -137,3 +138,4 @@ long PyMac_DummyWriteHandler(char *, long);
 #ifdef __cplusplus
        }
 #endif
+#endif
index 01c96ffec44ed8ef554520ba4106e05d615defa2..8dfe9ad4e6465c9288af79c5addb471aa1ccec5d 100644 (file)
@@ -40,6 +40,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 ** Resources that reside in the python executable (or, for
 ** shared ppc python, in the core dynamic library)
 */
+#ifndef Py_PYTHONRESOURCES_H
+#define Py_PYTHONRESOURCES_H
+
+#ifdef __cplusplus
+       extern "C" {
+#endif
 
 #define BASE_ID 228
 
@@ -181,3 +187,9 @@ char * PyMac_GetPythonDir(void);
 /* from macmain.c: */
 extern PyMac_PrefRecord PyMac_options;
 #endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif