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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
/* Code to access $name$ objects as numbers */
static PyObject *
$abbrev$_add($abbrev$object *v, $abbrev$object *w)
{
/* XXXX Add them */
}
static PyObject *
$abbrev$_sub($abbrev$object *v, $abbrev$object *w)
{
/* XXXX Subtract them */
}
static PyObject *
$abbrev$_mul($abbrev$object *v, $abbrev$object *w)
{
/* XXXX Multiply them */
}
static PyObject *
$abbrev$_div($abbrev$object *x, $abbrev$object *y)
{
/* XXXX Divide them */
}
static PyObject *
$abbrev$_mod($abbrev$object *x, $abbrev$object *y)
{
/* XXXX Modulo them */
}
static PyObject *
$abbrev$_divmod($abbrev$object *x, $abbrev$object *y)
{
/* XXXX Return 2-tuple with div and mod */
}
static PyObject *
$abbrev$_pow($abbrev$object *v, $abbrev$object *w, $abbrev$object *z)
{
/* XXXX */
}
static PyObject *
$abbrev$_neg($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_pos($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_abs($abbrev$object *v)
{
/* XXXX */
}
static int
$abbrev$_nonzero($abbrev$object *v)
{
/* XXXX Return 1 if non-zero */
}
static PyObject *
$abbrev$_invert($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_lshift($abbrev$object *v, $abbrev$object *w)
{
/* XXXX */
}
static PyObject *
$abbrev$_rshift($abbrev$object *v, $abbrev$object *w)
{
/* XXXX */
}
static PyObject *
$abbrev$_and($abbrev$object *v, $abbrev$object *w)
{
/* XXXX */
}
static PyObject *
$abbrev$_xor($abbrev$object *v, $abbrev$object *w)
{
/* XXXX */
}
static PyObject *
$abbrev$_or($abbrev$object *v, $abbrev$object *w)
{
/* XXXX */
}
static PyObject *
$abbrev$_int($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_long($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_float($abbrev$object *v)
{
/* XXXX */
}
static PyObject *
$abbrev$_oct($abbrev$object *v)
{
/* XXXX Return object as octal stringobject */
}
static PyObject *
$abbrev$_hex($abbrev$object *v)
{
/* XXXX Return object as hex stringobject */
}
static PyNumberMethods $abbrev$_as_number = {
(binaryfunc)$abbrev$_add, /*nb_add*/
(binaryfunc)$abbrev$_sub, /*nb_subtract*/
(binaryfunc)$abbrev$_mul, /*nb_multiply*/
(binaryfunc)$abbrev$_div, /*nb_divide*/
(binaryfunc)$abbrev$_mod, /*nb_remainder*/
(binaryfunc)$abbrev$_divmod, /*nb_divmod*/
(ternaryfunc)$abbrev$_pow, /*nb_power*/
(unaryfunc)$abbrev$_neg, /*nb_negative*/
(unaryfunc)$abbrev$_pos, /*nb_positive*/
(unaryfunc)$abbrev$_abs, /*nb_absolute*/
(inquiry)$abbrev$_nonzero, /*nb_nonzero*/
(unaryfunc)$abbrev$_invert, /*nb_invert*/
(binaryfunc)$abbrev$_lshift, /*nb_lshift*/
(binaryfunc)$abbrev$_rshift, /*nb_rshift*/
(binaryfunc)$abbrev$_and, /*nb_and*/
(binaryfunc)$abbrev$_xor, /*nb_xor*/
(binaryfunc)$abbrev$_or, /*nb_or*/
(coercion)$abbrev$_coerce, /*nb_coerce*/
(unaryfunc)$abbrev$_int, /*nb_int*/
(unaryfunc)$abbrev$_long, /*nb_long*/
(unaryfunc)$abbrev$_float, /*nb_float*/
(unaryfunc)$abbrev$_oct, /*nb_oct*/
(unaryfunc)$abbrev$_hex, /*nb_hex*/
};
/* ------------------------------------------------------- */
|