~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Lib/python/pymacros.swg

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-09-01 18:35:55 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050901183555-eq59uwhq8b62e44c
Tags: 1.3.24-1ubuntu4
* Use php5-dev instead of php4-dev, to kick php4 out of main.
* Drop support for generation of pike bindings, as nothing uses it,
  and swig is the only thing keeping pike7.6 in main (Ubuntu #13796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%{
2
 
/* Auxiliar swig  macros that appear in the header */
3
 
 
4
 
#define SWIG_OLDOBJ  1
5
 
#define SWIG_NEWOBJ  SWIG_OLDOBJ + 1
6
 
#define SWIG_PYSTR   SWIG_NEWOBJ + 1
7
 
 
8
 
#ifdef __cplusplus
9
 
#define SWIGSTATICINLINE(a) static inline a
10
 
#define SWIGSTATIC(a) static a
11
 
#define swig_new_array(size,Type) (new Type[(size)])
12
 
#define swig_delete(cptr) delete cptr
13
 
#define swig_delete_array(cptr) delete[] cptr
14
 
#define swig_const_cast(a,Type) const_cast<Type >(a)
15
 
#define swig_static_cast(a,Type) static_cast<Type >(a)
16
 
#define swig_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
17
 
#define swig_new_copy(ptr,Type) (new Type(*ptr))
18
 
#define swig_numeric_cast(a,Type) static_cast<Type >(a)
19
 
 
 
1
/* -----------------------------------------------------------------------------
 
2
 * SWIG API. Portion only visible from SWIG
 
3
 * ----------------------------------------------------------------------------- */
 
4
 
 
5
#define SWIG_arg(Arg...) Arg
 
6
 
 
7
#define SWIG_str(Type...) #Type
 
8
 
 
9
#define SWIG_Mangle(Type...) #@Type
 
10
#define SWIG_Descriptor(Type...) SWIGTYPE_ ## #@Type
 
11
 
 
12
#define SWIG_NameType(Name, Type...) SWIG_ ## Name ## _ ## #@Type
 
13
#define SWIG_StringType(Name, Type...)  "SWIG_" #Name "_" {Type}
 
14
 
 
15
#define SWIG_AsVal(Type...)      SWIG_NameType(AsVal, Type) 
 
16
#define SWIG_AsPtr(Type...)     SWIG_NameType(AsPtr, Type)
 
17
#define SWIG_As(Type...)        SWIG_NameType(As, Type)   
 
18
#define SWIG_From(Type...)      SWIG_NameType(From, Type) 
 
19
#define SWIG_Check(Type...)     SWIG_NameType(Check, Type)
 
20
#define SWIG_CCode(Type...)       SWIG_NameType(TYPECHECK, Type)
 
21
#define SWIG_OrderType(Type...)   SWIG_NameType(OrderType, Type)
 
22
#define SWIG_EqualType(Type...)   SWIG_NameType(EqualType, Type)
 
23
 
 
24
#define SWIG_Traits_frag(Type...)  SWIG_StringType(Traits, Type)
 
25
#define SWIG_AsPtr_frag(Type...)   SWIG_StringType(AsPtr, Type)
 
26
#define SWIG_AsVal_frag(Type...)   SWIG_StringType(AsVal, Type)
 
27
#define SWIG_As_frag(Type...)      SWIG_StringType(As, Type)
 
28
#define SWIG_From_frag(Type...)    SWIG_StringType(From, Type)
 
29
#define SWIG_Check_frag(Type...)   SWIG_StringType(Check, Type)
 
30
#define SWIG_CCode_frag(Type...)   SWIG_StringType(TYPECHECK, Type)
 
31
 
 
32
/* Internal C/C++ API */
 
33
#ifdef SWIG_NO_CPLUSPLUS_CAST
 
34
/* -----------------------------------------------------------------------------
 
35
 * Disable 'modern' cplusplus casting operators
 
36
 * ----------------------------------------------------------------------------- */
 
37
#ifdef SWIG_CPLUSPLUS_CAST
 
38
#undef SWIG_CPLUSPLUS_CAST
 
39
#endif
 
40
#endif
 
41
 
 
42
#if defined(__cplusplus) && defined(SWIG_CPLUSPLUS_CAST)
 
43
#define SWIG_new_array(size,Type...) (new Type[(size)])
 
44
#define SWIG_delete(cptr) delete cptr
 
45
#define SWIG_delete_array(cptr) delete[] cptr
 
46
#define SWIG_const_cast(a,Type...) const_cast<Type >(a)
 
47
#define SWIG_static_cast(a,Type...) static_cast<Type >(a)
 
48
#define SWIG_reinterpret_cast(a,Type...) reinterpret_cast<Type >(a)
 
49
#define SWIG_new_copy(ptr,Type...) (new Type(*ptr))
 
50
#define SWIG_numeric_cast(a,Type...) static_cast<Type >(a)
20
51
#else /* C case */
21
 
 
22
 
#define SWIGSTATICINLINE(a) static a
23
 
#define SWIGSTATIC(a) static a
24
 
#define swig_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
25
 
#define swig_delete(cptr) free((char*)cptr)
26
 
#define swig_delete_array(cptr) free((char*)cptr)
27
 
#define swig_const_cast(a,Type) (Type)(a)
28
 
#define swig_static_cast(a,Type) (Type)(a)
29
 
#define swig_reinterpret_cast(a,Type) (Type)(a)
30
 
#define swig_numeric_cast(a,Type) (Type)(a)
31
 
#define swig_new_copy(ptr,Type)  ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
32
 
 
 
52
#define SWIG_new_array(size,Type...) ((Type*) malloc((size)*sizeof(Type)))
 
53
#define SWIG_delete(cptr) free((char*)cptr)
 
54
#define SWIG_delete_array(cptr) free((char*)cptr)
 
55
#define SWIG_const_cast(a,Type...) (Type)(a)
 
56
#define SWIG_static_cast(a,Type...) (Type)(a)
 
57
#define SWIG_reinterpret_cast(a,Type...) (Type)(a)
 
58
#define SWIG_numeric_cast(a,Type...) (Type)(a)
 
59
#define SWIG_new_copy(ptr,Type...)  ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
33
60
#endif /* __cplusplus */
34
 
%}
35
 
 
36
 
 
37
 
/* Auxiliar swig  macros used to write typemaps */
38
 
#define SWIG_arg(...) __VA_ARGS__
39
 
#define SWIG_str(...) #__VA_ARGS__
40
 
 
41
 
#define SWIG_Mangle(...) #@__VA_ARGS__
42
 
#define SWIG_Descriptor(...) SWIGTYPE_ ## #@__VA_ARGS__
43
 
 
44
 
#define SWIG_NameType(Name, ...) SWIG_ ## Name ## _ ## #@__VA_ARGS__
45
 
#define SWIG_StringType(Name, ...)  "SWIG_" #Name "_" {__VA_ARGS__}
46
 
 
47
 
#define SWIG_AsVal(...)  SWIG_NameType(AsVal, __VA_ARGS__)
48
 
#define SWIG_AsPtr(...)  SWIG_NameType(AsPtr, __VA_ARGS__)
49
 
#define SWIG_As(...)     SWIG_NameType(As, __VA_ARGS__)
50
 
#define SWIG_From(...)   SWIG_NameType(From, __VA_ARGS__)
51
 
#define SWIG_Check(...)  SWIG_NameType(Check, __VA_ARGS__)
52
 
#define SWIG_CCode(...)       SWIG_NameType(TYPECHECK, __VA_ARGS__)
53
 
#define SWIG_OrderType(...)   SWIG_NameType(OrderType, __VA_ARGS__)
54
 
#define SWIG_EqualType(...)   SWIG_NameType(EqualType, __VA_ARGS__)
55
 
 
56
 
#define SWIG_Traits_frag(...)  SWIG_StringType(Traits, __VA_ARGS__)
57
 
#define SWIG_AsPtr_frag(...)   SWIG_StringType(AsPtr, __VA_ARGS__)
58
 
#define SWIG_AsVal_frag(...)   SWIG_StringType(AsVal, __VA_ARGS__)
59
 
#define SWIG_As_frag(...)      SWIG_StringType(As, __VA_ARGS__)
60
 
#define SWIG_From_frag(...)    SWIG_StringType(From, __VA_ARGS__)
61
 
#define SWIG_Check_frag(...)   SWIG_StringType(Check, __VA_ARGS__)
62
 
#define SWIG_CCode_frag(...)   SWIG_StringType(TYPECHECK, __VA_ARGS__)
63
 
 
64
 
 
 
61
 
 
62
 
 
63
/* -----------------------------------------------------------------------------
 
64
 * Auxiliar swig  macros used to write typemaps
 
65
 * ----------------------------------------------------------------------------- */
 
66
 
 
67
/* define a new macro */
65
68
%define SWIG_define(Def, Val)
66
69
%#define Def Val
67
70
%enddef
68
71
 
 
72
/* include C++ or C value */
69
73
%define SWIG_cplusplus(cppval, cval)
70
 
#if __cplusplus
 
74
#ifdef __cplusplus
71
75
cppval
72
76
#else
73
77
cval
75
79
%enddef
76
80
 
77
81
/* for loop for macro with one argument */
78
 
 
79
82
%define %_formacro_1(macro, arg1,...)
80
83
macro(arg1)
81
84
#if #__VA_ARGS__ != "__fordone__"
83
86
#endif
84
87
%enddef
85
88
 
 
89
/* for loop for macro with one argument */
86
90
%define %formacro_1(macro,...)
87
91
%_formacro_1(macro,__VA_ARGS__,__fordone__)
88
92
%enddef
89
93
 
90
94
/* for loop for macro with two arguments */
91
 
 
92
95
%define %_formacro_2(macro, arg1, arg2, ...)
93
96
macro(arg1, arg2)
94
97
#if #__VA_ARGS__ != "__fordone__"
96
99
#endif
97
100
%enddef
98
101
 
 
102
/* for loop for macro with two arguments */
99
103
%define %formacro_2(macro,...)
100
104
%_formacro_2(macro, __VA_ARGS__, __fordone__)
101
105
%enddef
113
117
#define x 1
114
118
%enddef
115
119
 
116
 
 
117
120
/*
118
121
 %swig_equal_type and %swig_order_type flagged a type of having equal (==,!=)
119
122
 and/or order methods  (<=,>=,<,>).