summaryrefslogtreecommitdiffstats
path: root/Modules/operator.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-12-18 19:50:00 (GMT)
committerBarry Warsaw <barry@python.org>1996-12-18 19:50:00 (GMT)
commit19f61ae1968f06798e5fc12653cfc9cf7459858e (patch)
tree14d1aa0ca2953adf6dab223d1bd31fde0782df72 /Modules/operator.c
parentb2b44e5b8a550d918ab82773175dea9dd6af5828 (diff)
downloadcpython-19f61ae1968f06798e5fc12653cfc9cf7459858e.zip
cpython-19f61ae1968f06798e5fc12653cfc9cf7459858e.tar.gz
cpython-19f61ae1968f06798e5fc12653cfc9cf7459858e.tar.bz2
Tabification changes only; the module was already newly named.
Diffstat (limited to 'Modules/operator.c')
-rw-r--r--Modules/operator.c69
1 files changed, 37 insertions, 32 deletions
diff --git a/Modules/operator.c b/Modules/operator.c
index 938019f..3b799e5 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -140,44 +140,48 @@ spam3n(op_setitem , PyObject_SetItem)
static PyObject*
op_getslice(s,a)
- PyObject *s, *a;
+ PyObject *s, *a;
{
- PyObject *a1;
- long a2,a3;
+ PyObject *a1;
+ long a2,a3;
- if(! PyArg_ParseTuple(a,"Oii",&a1,&a2,&a3)) return NULL;
-
- return PySequence_GetSlice(a1,a2,a3);
+ if (!PyArg_ParseTuple(a,"Oii",&a1,&a2,&a3))
+ return NULL;
+ return PySequence_GetSlice(a1,a2,a3);
}
static PyObject*
op_setslice(s,a)
- PyObject *s, *a;
+ PyObject *s, *a;
{
- PyObject *a1, *a4;
- long a2,a3;
+ PyObject *a1, *a4;
+ long a2,a3;
- if(! PyArg_ParseTuple(a,"OiiO",&a1,&a2,&a3,&a4)) return NULL;
+ if (!PyArg_ParseTuple(a,"OiiO",&a1,&a2,&a3,&a4))
+ return NULL;
- if(-1 == PySequence_SetSlice(a1,a2,a3,a4)) return NULL;
+ if (-1 == PySequence_SetSlice(a1,a2,a3,a4))
+ return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_INCREF(Py_None);
+ return Py_None;
}
static PyObject*
op_delslice(s,a)
- PyObject *s, *a;
+ PyObject *s, *a;
{
- PyObject *a1;
- long a2,a3;
+ PyObject *a1;
+ long a2,a3;
- if(! PyArg_ParseTuple(a,"Oii",&a1,&a2,&a3)) return NULL;
+ if(! PyArg_ParseTuple(a,"Oii",&a1,&a2,&a3))
+ return NULL;
- if(-1 == PySequence_DelSlice(a1,a2,a3)) return NULL;
+ if (-1 == PySequence_DelSlice(a1,a2,a3))
+ return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_INCREF(Py_None);
+ return Py_None;
}
#undef spam1
@@ -252,18 +256,19 @@ spam2(delslice,__delslice__,
void
initoperator()
{
- PyObject *m, *d;
+ PyObject *m, *d;
- /* Create the module and add the functions */
- m = Py_InitModule4("operator", operator_methods,
- operator_doc,
- (PyObject*)NULL,PYTHON_API_VERSION);
-
- /* Add some symbolic constants to the module */
- d = PyModule_GetDict(m);
- PyDict_SetItemString(d, "__version__",PyString_FromString("$Rev$"));
+ /* Create the module and add the functions */
+ m = Py_InitModule4("operator", operator_methods,
+ operator_doc,
+ (PyObject*)NULL,PYTHON_API_VERSION);
+
+ /* Add some symbolic constants to the module */
+ d = PyModule_GetDict(m);
+ PyDict_SetItemString(d, "__version__",
+ PyString_FromString("$Rev$"));
- /* Check for errors */
- if (PyErr_Occurred())
- Py_FatalError("can't initialize module operator");
+ /* Check for errors */
+ if (PyErr_Occurred())
+ Py_FatalError("can't initialize module operator");
}