[Python-checkins] CVS: python/dist/src/Objects rangeobject.c,2.15,2.16 sliceobject.c,2.4,2.5 typeobject.c,2.14,2.15
Fred L. Drake
python-dev@python.org
Sat, 8 Jul 2000 23:21:30 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Objects funcobject.c,2.28,2.29 methodobject.c,2.31,2.32 moduleobject.c,2.27,2.28
- Next message: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.74,2.75 tupleobject.c,2.42,2.43 xxobject.c,2.17,2.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv5928
Modified Files:
rangeobject.c sliceobject.c typeobject.c
Log Message:
ANSI-fication of the sources.
Index: rangeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -r2.15 -r2.16
*** rangeobject.c 2000/06/30 23:58:05 2.15
--- rangeobject.c 2000/07/09 06:21:27 2.16
***************
*** 23,29 ****
PyObject *
! PyRange_New(start, len, step, reps)
! long start, len, step;
! int reps;
{
rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type);
--- 23,27 ----
PyObject *
! PyRange_New(long start, long len, long step, int reps)
{
rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type);
***************
*** 38,43 ****
static void
! range_dealloc(r)
! rangeobject *r;
{
PyObject_DEL(r);
--- 36,40 ----
static void
! range_dealloc(rangeobject *r)
{
PyObject_DEL(r);
***************
*** 45,51 ****
static PyObject *
! range_item(r, i)
! rangeobject *r;
! int i;
{
if (i < 0 || i >= r->len * r->reps) {
--- 42,46 ----
static PyObject *
! range_item(rangeobject *r, int i)
{
if (i < 0 || i >= r->len * r->reps) {
***************
*** 59,64 ****
static int
! range_length(r)
! rangeobject *r;
{
return r->len * r->reps;
--- 54,58 ----
static int
! range_length(rangeobject *r)
{
return r->len * r->reps;
***************
*** 66,73 ****
static int
! range_print(r, fp, flags)
! rangeobject *r;
! FILE *fp;
! int flags;
{
int i, j;
--- 60,64 ----
static int
! range_print(rangeobject *r, FILE *fp, int flags)
{
int i, j;
***************
*** 89,94 ****
static PyObject *
! range_repr(r)
! rangeobject *r;
{
char buf[80];
--- 80,84 ----
static PyObject *
! range_repr(rangeobject *r)
{
char buf[80];
***************
*** 102,108 ****
static PyObject *
! range_concat(r, obj)
! rangeobject *r;
! PyObject *obj;
{
PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects");
--- 92,96 ----
static PyObject *
! range_concat(rangeobject *r, PyObject *obj)
{
PyErr_SetString(PyExc_TypeError, "cannot concatenate xrange objects");
***************
*** 111,117 ****
static PyObject *
! range_repeat(r, n)
! rangeobject *r;
! int n;
{
if (n < 0)
--- 99,103 ----
static PyObject *
! range_repeat(rangeobject *r, int n)
{
if (n < 0)
***************
*** 132,137 ****
static int
! range_compare(r1, r2)
! rangeobject *r1, *r2;
{
if (r1->start != r2->start)
--- 118,122 ----
static int
! range_compare(rangeobject *r1, rangeobject *r2)
{
if (r1->start != r2->start)
***************
*** 149,155 ****
static PyObject *
! range_slice(r, low, high)
! rangeobject *r;
! int low, high;
{
if (r->reps != 1) {
--- 134,138 ----
static PyObject *
! range_slice(rangeobject *r, int low, int high)
{
if (r->reps != 1) {
***************
*** 182,188 ****
static PyObject *
! range_tolist(self, args)
! rangeobject *self;
! PyObject *args;
{
PyObject *thelist;
--- 165,169 ----
static PyObject *
! range_tolist(rangeobject *self, PyObject *args)
{
PyObject *thelist;
***************
*** 205,211 ****
static PyObject *
! range_getattr(r, name)
! rangeobject *r;
! char *name;
{
static PyMethodDef range_methods[] = {
--- 186,190 ----
static PyObject *
! range_getattr(rangeobject *r, char *name)
{
static PyMethodDef range_methods[] = {
***************
*** 218,224 ****
static int
! range_contains(r, obj)
! rangeobject * r;
! PyObject * obj;
{
long num = PyInt_AsLong(obj);
--- 197,201 ----
static int
! range_contains(rangeobject *r, PyObject *obj)
{
long num = PyInt_AsLong(obj);
Index: sliceobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -r2.4 -r2.5
*** sliceobject.c 2000/05/03 23:44:35 2.4
--- sliceobject.c 2000/07/09 06:21:27 2.5
***************
*** 17,22 ****
static PyObject *
! ellipsis_repr(op)
! PyObject *op;
{
return PyString_FromString("Ellipsis");
--- 17,21 ----
static PyObject *
! ellipsis_repr(PyObject *op)
{
return PyString_FromString("Ellipsis");
***************
*** 53,60 ****
PyObject *
! PySlice_New(start, stop, step)
! PyObject *start;
! PyObject *stop;
! PyObject *step;
{
PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type);
--- 52,56 ----
PyObject *
! PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
{
PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type);
***************
*** 75,84 ****
int
! PySlice_GetIndices(r, length, start, stop, step)
! PySliceObject *r;
! int length;
! int *start;
! int *stop;
! int *step;
{
if (r->step == Py_None) {
--- 71,76 ----
int
! PySlice_GetIndices(PySliceObject *r, int length,
! int *start, int *stop, int *step)
{
if (r->step == Py_None) {
***************
*** 109,114 ****
static void
! slice_dealloc(r)
! PySliceObject *r;
{
Py_DECREF(r->step);
--- 101,105 ----
static void
! slice_dealloc(PySliceObject *r)
{
Py_DECREF(r->step);
***************
*** 119,124 ****
static PyObject *
! slice_repr(r)
! PySliceObject *r;
{
PyObject *s, *comma;
--- 110,114 ----
static PyObject *
! slice_repr(PySliceObject *r)
{
PyObject *s, *comma;
***************
*** 137,143 ****
! static PyObject *slice_getattr(self, name)
! PySliceObject *self;
! char *name;
{
PyObject *ret;
--- 127,131 ----
! static PyObject *slice_getattr(PySliceObject *self, char *name)
{
PyObject *ret;
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -r2.14 -r2.15
*** typeobject.c 2000/06/30 23:58:05 2.14
--- typeobject.c 2000/07/09 06:21:27 2.15
***************
*** 16,22 ****
static PyObject *
! type_getattr(t, name)
! PyTypeObject *t;
! char *name;
{
if (strcmp(name, "__name__") == 0)
--- 16,20 ----
static PyObject *
! type_getattr(PyTypeObject *t, char *name)
{
if (strcmp(name, "__name__") == 0)
***************
*** 36,41 ****
static PyObject *
! type_repr(v)
! PyTypeObject *v;
{
char buf[100];
--- 34,38 ----
static PyObject *
! type_repr(PyTypeObject *v)
{
char buf[100];
- Previous message: [Python-checkins] CVS: python/dist/src/Objects funcobject.c,2.28,2.29 methodobject.c,2.31,2.32 moduleobject.c,2.27,2.28
- Next message: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.74,2.75 tupleobject.c,2.42,2.43 xxobject.c,2.17,2.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]