(py-indent-right, py-outdent-left): new commands, bound to C-c C-r and
[python/dscho.git] / Tools / modulator / Templates / object_tp_as_sequence
blob50f2f9173f0e429ff27453a5a65164cae3771dc2
2 /* Code to handle accessing $name$ objects as sequence objects */
4 static int
5 $abbrev$_length(self)
6         $abbrev$object *self;
8         /* XXXX Return the size of the object */
11 static object *
12 $abbrev$_concat(self, bb)
13         $abbrev$object *self;
14         object *bb;
16         /* XXXX Return the concatenation of self and bb */
19 static object *
20 $abbrev$_repeat(self, n)
21         $abbrev$object *self;
22         int n;
24         /* XXXX Return a new object that is n times self */
27 static object *
28 $abbrev$_item(self, i)
29         $abbrev$object *self;
30         int i;
32         /* XXXX Return the i-th object of self */
35 static object *
36 $abbrev$_slice(self, ilow, ihigh)
37         $abbrev$object *self;
38         int ilow, ihigh;
40         /* XXXX Return the ilow..ihigh slice of self in a new object */
43 static int
44 $abbrev$_ass_item(self, i, v)
45         $abbrev$object *self;
46         int i;
47         object *v;
49         /* XXXX Assign to the i-th element of self */
50         return 0;
53 static int
54 $abbrev$_ass_slice(self, ilow, ihigh, v)
55         listobject *self;
56         int ilow, ihigh;
57         object *v;
59         /* XXXX Replace ilow..ihigh slice of self with v */
60         return 0;
63 static sequence_methods $abbrev$_as_sequence = {
64         (inquiry)$abbrev$_length,               /*sq_length*/
65         (binaryfunc)$abbrev$_concat,            /*sq_concat*/
66         (intargfunc)$abbrev$_repeat,            /*sq_repeat*/
67         (intargfunc)$abbrev$_item,              /*sq_item*/
68         (intintargfunc)$abbrev$_slice,          /*sq_slice*/
69         (intobjargproc)$abbrev$_ass_item,       /*sq_ass_item*/
70         (intintobjargproc)$abbrev$_ass_slice,   /*sq_ass_slice*/
73 /* -------------------------------------------------------------- */