Skip to content

Commit 584199c

Browse files
author
guido
committed
* Added support for X11 modules.
* Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++. git-svn-id: http://svn.python.org/projects/python/trunk@3496 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 3314f67 commit 584199c

57 files changed

Lines changed: 986 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Include/accessobject.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_ACCESSOBJECT_H
2+
#define Py_ACCESSOBJECT_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -53,3 +59,8 @@ object *cloneaccessobject PROTO((object *));
5359
int hasaccessvalue PROTO((object *));
5460

5561
extern typeobject Anynumbertype, Anysequencetype, Anymappingtype;
62+
63+
#ifdef __cplusplus
64+
}
65+
#endif
66+
#endif /* !Py_ACCESSOBJECT_H */

Include/allobjects.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_ALLOBJECTS_H
2+
#define Py_ALLOBJECTS_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -53,4 +59,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5359
#include "errors.h"
5460
#include "mymalloc.h"
5561

62+
#include "modsupport.h"
63+
#include "ceval.h"
64+
65+
#include "rename1.h"
66+
5667
extern void fatal PROTO((char *));
68+
69+
#ifdef __cplusplus
70+
}
71+
#endif
72+
#endif /* !Py_ALLOBJECTS_H */

Include/assert.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_ASSERT_H
2+
#define Py_ASSERT_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -23,3 +29,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2329
******************************************************************/
2430

2531
#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
32+
33+
#ifdef __cplusplus
34+
}
35+
#endif
36+
#endif /* !Py_ASSERT_H */

Include/bitset.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_BITSET_H
2+
#define Py_BITSET_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -44,3 +50,8 @@ void mergebitset PROTO((bitset bs1, bitset bs2, int nbits));
4450
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
4551

4652
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
53+
54+
#ifdef __cplusplus
55+
}
56+
#endif
57+
#endif /* !Py_BITSET_H */

Include/bltinmodule.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_BLTINMODULE_H
2+
#define Py_BLTINMODULE_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -25,3 +31,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2531
/* Built-in module interface */
2632

2733
extern object *getbuiltin PROTO((object *));
34+
35+
#ifdef __cplusplus
36+
}
37+
#endif
38+
#endif /* !Py_BLTINMODULE_H */

Include/ceval.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_CEVAL_H
2+
#define Py_CEVAL_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -100,3 +106,8 @@ extern void restore_thread PROTO((object *));
100106
#define END_SAVE }
101107

102108
#endif /* !USE_THREAD */
109+
110+
#ifdef __cplusplus
111+
}
112+
#endif
113+
#endif /* !Py_CEVAL_H */

Include/cgensupport.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_CGENSUPPORT_H
2+
#define Py_CGENSUPPORT_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -36,3 +42,8 @@ extern int getilongarg PROTO((object *args, int nargs, int i, long *p_a));
3642
extern int getishortarg PROTO((object *args, int nargs, int i, short *p_a));
3743
extern int getifloatarg PROTO((object *args, int nargs, int i, float *p_a));
3844
extern int getistringarg PROTO((object *args, int nargs, int i, string *p_a));
45+
46+
#ifdef __cplusplus
47+
}
48+
#endif
49+
#endif /* !Py_CGENSUPPORT_H */

Include/classobject.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_CLASSOBJECT_H
2+
#define Py_CLASSOBJECT_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -56,3 +62,8 @@ extern object *instancemethodgetclass PROTO((object *));
5662
extern object *instance_convert PROTO((object *, char *));
5763

5864
extern int issubclass PROTO((object *, object *));
65+
66+
#ifdef __cplusplus
67+
}
68+
#endif
69+
#endif /* !Py_CLASSOBJECT_H */

Include/compile.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_COMPILE_H
2+
#define Py_COMPILE_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -51,3 +57,8 @@ struct _node; /* Declare the existence of this type */
5157
codeobject *compile PROTO((struct _node *, char *));
5258
codeobject *newcodeobject
5359
PROTO((object *, object *, object *, object *, object *));
60+
61+
#ifdef __cplusplus
62+
}
63+
#endif
64+
#endif /* !Py_COMPILE_H */

Include/dictobject.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#ifndef Py_DICTOBJECT_H
2+
#define Py_DICTOBJECT_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
17
/***********************************************************
28
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
39
Amsterdam, The Netherlands.
@@ -39,3 +45,8 @@ extern int dictremove PROTO((object *dp, char *key));
3945
#define dict2lookup mappinglookup
4046
#define dict2insert mappinginsert
4147
#define dict2remove mappingremove
48+
49+
#ifdef __cplusplus
50+
}
51+
#endif
52+
#endif /* !Py_DICTOBJECT_H */

0 commit comments

Comments
 (0)