Use full package paths in imports.
[python/dscho.git] / Tools / modulator / Templates / object_tp_as_sequence
blob54c0b92901810bec09fc849c762a7fd3615e4107
2 /* Code to handle accessing $name$ objects as sequence objects */
4 static int
5 $abbrev$_length($abbrev$object *self)
7         /* XXXX Return the size of the object */
10 static PyObject *
11 $abbrev$_concat($abbrev$object *self, PyObject *bb)
13         /* XXXX Return the concatenation of self and bb */
16 static PyObject *
17 $abbrev$_repeat($abbrev$object *self, int n)
19         /* XXXX Return a new object that is n times self */
22 static PyObject *
23 $abbrev$_item($abbrev$object *self, int i)
25         /* XXXX Return the i-th object of self */
28 static PyObject *
29 $abbrev$_slice($abbrev$object *self, int ilow, int ihigh)
31         /* XXXX Return the ilow..ihigh slice of self in a new object */
34 static int
35 $abbrev$_ass_item($abbrev$object *self, int i, PyObject *v)
37         /* XXXX Assign to the i-th element of self */
38         return 0;
41 static int
42 $abbrev$_ass_slice(PyListObject *self, int ilow, int ihigh, PyObject *v)
44         /* XXXX Replace ilow..ihigh slice of self with v */
45         return 0;
48 static PySequenceMethods $abbrev$_as_sequence = {
49         (inquiry)$abbrev$_length,               /*sq_length*/
50         (binaryfunc)$abbrev$_concat,            /*sq_concat*/
51         (intargfunc)$abbrev$_repeat,            /*sq_repeat*/
52         (intargfunc)$abbrev$_item,              /*sq_item*/
53         (intintargfunc)$abbrev$_slice,          /*sq_slice*/
54         (intobjargproc)$abbrev$_ass_item,       /*sq_ass_item*/
55         (intintobjargproc)$abbrev$_ass_slice,   /*sq_ass_slice*/
58 /* -------------------------------------------------------------- */