1995-05-16 10:47:03 -03:00
|
|
|
|
1995-03-02 10:05:29 -04:00
|
|
|
/* Code to access $name$ objects as mappings */
|
|
|
|
|
|
|
|
static int
|
|
|
|
$abbrev$_length(self)
|
|
|
|
$abbrev$object *self;
|
|
|
|
{
|
|
|
|
/* XXXX Return the size of the mapping */
|
|
|
|
}
|
|
|
|
|
1995-05-16 10:47:03 -03:00
|
|
|
static PyObject *
|
1995-03-02 10:05:29 -04:00
|
|
|
$abbrev$_subscript(self, key)
|
|
|
|
$abbrev$object *self;
|
1995-05-16 10:47:03 -03:00
|
|
|
PyObject *key;
|
1995-03-02 10:05:29 -04:00
|
|
|
{
|
|
|
|
/* XXXX Return the item of self indexed by key */
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
$abbrev$_ass_sub(self, v, w)
|
|
|
|
$abbrev$object *self;
|
1995-05-16 10:47:03 -03:00
|
|
|
PyObject *v, *w;
|
1995-03-02 10:05:29 -04:00
|
|
|
{
|
|
|
|
/* XXXX Put w in self under key v */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1995-05-16 10:47:03 -03:00
|
|
|
static PyMappingMethods $abbrev$_as_mapping = {
|
1995-03-02 10:05:29 -04:00
|
|
|
(inquiry)$abbrev$_length, /*mp_length*/
|
|
|
|
(binaryfunc)$abbrev$_subscript, /*mp_subscript*/
|
|
|
|
(objobjargproc)$abbrev$_ass_sub, /*mp_ass_subscript*/
|
|
|
|
};
|
|
|
|
|
|
|
|
/* -------------------------------------------------------- */
|