[CalendarServer-changes] [1319] PyOpenDirectory/trunk/src
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 5 17:29:16 PST 2007
Revision: 1319
http://trac.macosforge.org/projects/calendarserver/changeset/1319
Author: wsanchez at apple.com
Date: 2007-03-05 17:29:15 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
<Python.h> not <Python/Python.h>, which imports the wrong header if
you aren't using the system's primary python version.
Define Py_ssize_t on Python < 2.5.
Modified Paths:
--------------
PyOpenDirectory/trunk/src/CDirectoryService.cpp
PyOpenDirectory/trunk/src/PythonWrapper.cpp
Modified: PyOpenDirectory/trunk/src/CDirectoryService.cpp
===================================================================
--- PyOpenDirectory/trunk/src/CDirectoryService.cpp 2007-03-06 01:09:56 UTC (rev 1318)
+++ PyOpenDirectory/trunk/src/CDirectoryService.cpp 2007-03-06 01:29:15 UTC (rev 1319)
@@ -23,7 +23,7 @@
#include "CFStringUtil.h"
-#include <Python/Python.h>
+#include <Python.h>
#include <stdlib.h>
#include <string.h>
Modified: PyOpenDirectory/trunk/src/PythonWrapper.cpp
===================================================================
--- PyOpenDirectory/trunk/src/PythonWrapper.cpp 2007-03-06 01:09:56 UTC (rev 1318)
+++ PyOpenDirectory/trunk/src/PythonWrapper.cpp 2007-03-06 01:29:15 UTC (rev 1319)
@@ -17,7 +17,7 @@
**/
#include <CoreFoundation/CoreFoundation.h>
-#include <Python/Python.h>
+#include <Python.h>
#include "CDirectoryService.h"
#include "CFStringUtil.h"
@@ -32,6 +32,13 @@
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
+#if PY_MAJOR_VERSION < 2
+#error Python major version must be >= 2
+#endif
+#if PY_MINOR_VERSION < 5
+typedef int Py_ssize_t;
+#endif
+
// Utility function - not exposed to Python
static PyObject* CFStringToPyStr(CFStringRef str)
{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070305/ec5e0ab1/attachment.html
More information about the calendarserver-changes
mailing list