Commit 47ec1419 authored by Jack Jansen's avatar Jack Jansen

Added include guards and C++ extern "C" {} constructs. Partial fix for #607253.

Bugfix candidate.
parent 2575022a
/* /*
** pymactoolbox.h - globals defined in mactoolboxglue.c ** pymactoolbox.h - globals defined in mactoolboxglue.c
*/ */
#ifndef Py_PYMACTOOLBOX_H
#define Py_PYMACTOOLBOX_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
...@@ -197,3 +198,4 @@ extern int OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *); ...@@ -197,3 +198,4 @@ extern int OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif
...@@ -21,6 +21,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT ...@@ -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. OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/ ******************************************************************/
#ifndef Py_GETAPPLBYCREATOR_H
#define Py_GETALLPBYCREATOR_H
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <Types.h> #include <Types.h>
...@@ -29,4 +31,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -29,4 +31,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
extern OSErr FindApplicationFromCreator(OSType, FSSpecPtr); extern OSErr FindApplicationFromCreator(OSType, FSSpecPtr);
#ifdef __cplusplus
}
#endif
#endif
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
look-alike file system access functions on the Macintosh. look-alike file system access functions on the Macintosh.
Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
*/ */
#ifndef Py_MACDEFS_H
#define Py_MACDEFS_H
#include <Types.h> #include <Types.h>
#include <Files.h> #include <Files.h>
...@@ -14,6 +16,10 @@ ...@@ -14,6 +16,10 @@
#include <TextUtils.h> #include <TextUtils.h>
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
/* We may be able to use a std routine in think, don't know */ /* We may be able to use a std routine in think, don't know */
extern unsigned char *Pstring(char *); extern unsigned char *Pstring(char *);
extern char *getbootvol(void); extern char *getbootvol(void);
...@@ -33,3 +39,8 @@ extern int sync(void); ...@@ -33,3 +39,8 @@ extern int sync(void);
#endif #endif
#define EOS '\0' #define EOS '\0'
#define SEP ':' #define SEP ':'
#ifdef __cplusplus
}
#endif
#endif
...@@ -21,7 +21,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT ...@@ -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. OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/ ******************************************************************/
#ifndef Py_MACGLUE_H
#define Py_MACGLUE_H
#ifdef WITHOUT_FRAMEWORKS #ifdef WITHOUT_FRAMEWORKS
#include <Types.h> #include <Types.h>
#include <Files.h> #include <Files.h>
...@@ -137,3 +138,4 @@ long PyMac_DummyWriteHandler(char *, long); ...@@ -137,3 +138,4 @@ long PyMac_DummyWriteHandler(char *, long);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif
...@@ -40,6 +40,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -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 ** Resources that reside in the python executable (or, for
** shared ppc python, in the core dynamic library) ** 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 #define BASE_ID 228
...@@ -181,3 +187,9 @@ char * PyMac_GetPythonDir(void); ...@@ -181,3 +187,9 @@ char * PyMac_GetPythonDir(void);
/* from macmain.c: */ /* from macmain.c: */
extern PyMac_PrefRecord PyMac_options; extern PyMac_PrefRecord PyMac_options;
#endif #endif
#ifdef __cplusplus
}
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment