mirror of
https://github.com/darlinghq/darling-python.git
synced 2024-11-27 06:01:13 +00:00
Restore Darling Specific Changes
This commit is contained in:
parent
9fe8ec4d50
commit
35bb1a1bfe
@ -17,16 +17,21 @@
|
||||
#endif
|
||||
/* Workaround */
|
||||
|
||||
#if __has_include(<Availability.h>)
|
||||
// this path is disabled in Darling because Apple's SDK does the same
|
||||
// (well, they actually replace the macro directly with `!__LP64__`)
|
||||
#if __has_include(<Availability.h>) && !defined(DARLING)
|
||||
#include <Availability.h>
|
||||
#define APPLE_SUPPORTS_QUICKTIME (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) && !__LP64__
|
||||
#else
|
||||
#define APPLE_SUPPORTS_QUICKTIME !__LP64__
|
||||
#endif
|
||||
|
||||
// this is also disabled in Darling for the same reason (not enabled in Apple's SDK)
|
||||
#ifndef DARLING
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Helper routines for error codes and such.
|
||||
@ -171,6 +176,8 @@ extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Qt exports */
|
||||
// disabled for Darling because Apple's SDK disables it too
|
||||
#ifndef DARLING
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *TrackObj_New(Track);
|
||||
extern int TrackObj_Convert(PyObject *, Track *);
|
||||
@ -185,6 +192,7 @@ extern int UserDataObj_Convert(PyObject *, UserData *);
|
||||
extern PyObject *MediaObj_New(Media);
|
||||
extern int MediaObj_Convert(PyObject *, Media *);
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
#endif
|
||||
|
||||
/* Res exports */
|
||||
extern PyObject *ResObj_New(Handle);
|
||||
|
@ -26,9 +26,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#include "Python.h"
|
||||
#include "pymactoolbox.h"
|
||||
#include <arpa/inet.h> /* for ntohl, htonl */
|
||||
#ifndef DARLING
|
||||
#ifndef __LP64__
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Like strerror() but for Mac OS error numbers */
|
||||
@ -422,6 +424,8 @@ GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd")
|
||||
GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
|
||||
GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
|
||||
|
||||
// again, see the header
|
||||
#ifndef DARLING
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
|
||||
GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
|
||||
@ -436,6 +440,7 @@ GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
|
||||
GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
|
||||
GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
#endif
|
||||
|
||||
GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
|
||||
GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")
|
||||
|
1
2.7/Python-2.7.16/dummy.c
Normal file
1
2.7/Python-2.7.16/dummy.c
Normal file
@ -0,0 +1 @@
|
||||
// this file is a dummy source to avoid having only object library sources for a target
|
Loading…
Reference in New Issue
Block a user