summaryrefslogtreecommitdiff
path: root/Modules/getpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r--Modules/getpath.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 4716d15458..8eba730ccf 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -91,6 +91,11 @@
* process to find the installed Python tree.
*/
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
#ifndef VERSION
#if defined(__VMS)
#define VERSION "2_1"
@@ -566,7 +571,7 @@ calculate_path(void)
bufsz += strlen(exec_prefix) + 1;
/* This is the only malloc call in this file */
- buf = PyMem_Malloc(bufsz);
+ buf = (char *)PyMem_Malloc(bufsz);
if (buf == NULL) {
/* We can't exit, so print a warning and limp along */
@@ -681,3 +686,9 @@ Py_GetProgramFullPath(void)
calculate_path();
return progpath;
}
+
+
+#ifdef __cplusplus
+}
+#endif
+