1995-05-16 13:47:03 +00:00
|
|
|
|
1995-03-02 14:05:29 +00:00
|
|
|
/* Code to access $name$ objects as numbers */
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_add($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Add them */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_sub($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Subtract them */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_mul($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Multiply them */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_div($abbrev$object *x, $abbrev$object *y)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Divide them */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_mod($abbrev$object *x, $abbrev$object *y)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Modulo them */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_divmod($abbrev$object *x, $abbrev$object *y)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Return 2-tuple with div and mod */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_pow($abbrev$object *v, $abbrev$object *w, $abbrev$object *z)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_neg($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_pos($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_abs($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_nonzero($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Return 1 if non-zero */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_invert($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_lshift($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_rshift($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_and($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_xor($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_or($abbrev$object *v, $abbrev$object *w)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_coerce(PyObject **pv, PyObject **pw)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX I haven't a clue... */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_int($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_long($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_float($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_oct($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Return object as octal stringobject */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyObject *
|
2001-12-27 23:35:43 +00:00
|
|
|
$abbrev$_hex($abbrev$object *v)
|
1995-03-02 14:05:29 +00:00
|
|
|
{
|
|
|
|
/* XXXX Return object as hex stringobject */
|
|
|
|
}
|
|
|
|
|
1995-05-16 13:47:03 +00:00
|
|
|
static PyNumberMethods $abbrev$_as_number = {
|
1995-03-02 14:05:29 +00:00
|
|
|
(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*/
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ------------------------------------------------------- */
|