aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pyprefix.h
blob: 42befa60f4a861172ba5069506e20d09a88f9513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* 

py/pyext - python script object for PD and MaxMSP

Copyright (c)2002-2007 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.  

*/

#ifndef __PYPREFIX_H
#define __PYPREFIX_H

#define FLEXT_ATTRIBUTES 1
#include <flext.h>

// hack: must include math.h before Python.h (at least on OSX)
// otherwise some functions don't get defined
#include <math.h>

#if FLEXT_OS == FLEXT_OS_MAC
#include <Python/Python.h>
#else
#include <Python.h>
#endif

#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 501)
#error You need at least flext version 0.5.1
#endif

#if FLEXT_OS == FLEXT_LINUX || FLEXT_OS == FLEXT_IRIX
#include <unistd.h>
#endif

#if FLEXT_SYS == FLEXT_SYS_PD && (!defined (PD_MINOR_VERSION) || PD_MINOR_VERSION < 37)
#error PD version >= 0.37 required, please upgrade! 
#endif

#include <flcontainers.h>
#include <string>

#ifdef PY_USE_INOFFICIAL
extern "C" {
#include <s_stuff.h>
}
#endif

#endif