Don't reference removed files in Makefile
[python/dscho.git] / Tools / modulator / Templates / object_tp_as_number
blobb97d473520677ef7890335391e4f225361ffe267
1 /* Code to access $name$ objects as numbers */
3 static object *
4 $abbrev$_add(v, w)
5         $abbrev$object *v;
6         $abbrev$object *w;
8         /* XXXX Add them */
9         err_setstr(SystemError, "not implemented");
10         return NULL;
13 static object *
14 $abbrev$_sub(v, w)
15         $abbrev$object *v;
16         $abbrev$object *w;
18         /* XXXX Subtract them */
19         err_setstr(SystemError, "not implemented");
20         return NULL;
23 static object *
24 $abbrev$_mul(v, w)
25         $abbrev$object *v;
26         $abbrev$object *w;
28         /* XXXX Multiply them */
29         err_setstr(SystemError, "not implemented");
30         return NULL;
33 static object *
34 $abbrev$_div(x, y)
35         $abbrev$object *x;
36         $abbrev$object *y;
38         /* XXXX Divide them */
39         err_setstr(SystemError, "not implemented");
40         return NULL;
43 static object *
44 $abbrev$_mod(x, y)
45         $abbrev$object *x;
46         $abbrev$object *y;
48         /* XXXX Modulo them */
49         err_setstr(SystemError, "not implemented");
50         return NULL;
53 static object *
54 $abbrev$_divmod(x, y)
55         $abbrev$object *x;
56         $abbrev$object *y;
58         /* XXXX Return 2-tuple with div and mod */
59         err_setstr(SystemError, "not implemented");
60         return NULL;
63 static object *
64 $abbrev$_pow(v, w, z)
65         $abbrev$object *v;
66         $abbrev$object *w;
67         $abbrev$object *z;
69         /* XXXX */
70         err_setstr(SystemError, "not implemented");
71         return NULL;
72 }                               
74 static object *
75 $abbrev$_neg(v)
76         $abbrev$object *v;
78         /* XXXX */
79         err_setstr(SystemError, "not implemented");
80         return NULL;
83 static object *
84 $abbrev$_pos(v)
85         $abbrev$object *v;
87         /* XXXX */
88         err_setstr(SystemError, "not implemented");
89         return NULL;
92 static object *
93 $abbrev$_abs(v)
94         $abbrev$object *v;
96         /* XXXX */
97         err_setstr(SystemError, "not implemented");
98         return NULL;
101 static int
102 $abbrev$_nonzero(v)
103         $abbrev$object *v;
105         /* XXXX Return 1 if non-zero */
106         err_setstr(SystemError, "not implemented");
107         return -1;
110 static object *
111 $abbrev$_invert(v)
112         $abbrev$object *v;
114         /* XXXX */
115         err_setstr(SystemError, "not implemented");
116         return NULL;
119 static object *
120 $abbrev$_lshift(v, w)
121         $abbrev$object *v;
122         $abbrev$object *w;
124         /* XXXX */
125         err_setstr(SystemError, "not implemented");
126         return NULL;
129 static object *
130 $abbrev$_rshift(v, w)
131         $abbrev$object *v;
132         $abbrev$object *w;
134         /* XXXX */
135         err_setstr(SystemError, "not implemented");
136         return NULL;
139 static object *
140 $abbrev$_and(v, w)
141         $abbrev$object *v;
142         $abbrev$object *w;
144         /* XXXX */
145         err_setstr(SystemError, "not implemented");
146         return NULL;
149 static object *
150 $abbrev$_xor(v, w)
151         $abbrev$object *v;
152         $abbrev$object *w;
154         /* XXXX */
155         err_setstr(SystemError, "not implemented");
156         return NULL;
159 static object *
160 $abbrev$_or(v, w)
161         $abbrev$object *v;
162         $abbrev$object *w;
164         /* XXXX */
165         err_setstr(SystemError, "not implemented");
166         return NULL;
169 static int
170 $abbrev$_coerce(pv, pw)
171         object **pv;
172         object **pw;
174         /* XXXX I haven't a clue... */
175         return 1;
178 static object *
179 $abbrev$_int(v)
180         $abbrev$object *v;
182         /* XXXX */
183         err_setstr(SystemError, "not implemented");
184         return NULL;
187 static object *
188 $abbrev$_long(v)
189         $abbrev$object *v;
191         /* XXXX */
192         err_setstr(SystemError, "not implemented");
193         return NULL;
196 static object *
197 $abbrev$_float(v)
198         $abbrev$object *v;
200         /* XXXX */
201         err_setstr(SystemError, "not implemented");
202         return NULL;
205 static object *
206 $abbrev$_oct(v)
207         $abbrev$object *v;
209         /* XXXX Return object as octal stringobject */
210         err_setstr(SystemError, "not implemented");
211         return NULL;
214 static object *
215 $abbrev$_hex(v)
216         $abbrev$object *v;
218         /* XXXX Return object as hex stringobject */
219         err_setstr(SystemError, "not implemented");
220         return NULL;
223 static number_methods $abbrev$_as_number = {
224         (binaryfunc)$abbrev$_add,       /*nb_add*/
225         (binaryfunc)$abbrev$_sub,       /*nb_subtract*/
226         (binaryfunc)$abbrev$_mul,       /*nb_multiply*/
227         (binaryfunc)$abbrev$_div,       /*nb_divide*/
228         (binaryfunc)$abbrev$_mod,       /*nb_remainder*/
229         (binaryfunc)$abbrev$_divmod,    /*nb_divmod*/
230         (ternaryfunc)$abbrev$_pow,      /*nb_power*/
231         (unaryfunc)$abbrev$_neg,        /*nb_negative*/
232         (unaryfunc)$abbrev$_pos,        /*nb_positive*/
233         (unaryfunc)$abbrev$_abs,        /*nb_absolute*/
234         (inquiry)$abbrev$_nonzero,      /*nb_nonzero*/
235         (unaryfunc)$abbrev$_invert,     /*nb_invert*/
236         (binaryfunc)$abbrev$_lshift,    /*nb_lshift*/
237         (binaryfunc)$abbrev$_rshift,    /*nb_rshift*/
238         (binaryfunc)$abbrev$_and,       /*nb_and*/
239         (binaryfunc)$abbrev$_xor,       /*nb_xor*/
240         (binaryfunc)$abbrev$_or,        /*nb_or*/
241         (coercion)$abbrev$_coerce,      /*nb_coerce*/
242         (unaryfunc)$abbrev$_int,        /*nb_int*/
243         (unaryfunc)$abbrev$_long,       /*nb_long*/
244         (unaryfunc)$abbrev$_float,      /*nb_float*/
245         (unaryfunc)$abbrev$_oct,        /*nb_oct*/
246         (unaryfunc)$abbrev$_hex,        /*nb_hex*/
249 /* ------------------------------------------------------- */