[Zope-CVS] CVS: Packages/Spread - spreadmodule.c:1.10
Tim Peters
tim.one@home.com
Thu, 20 Dec 2001 00:15:54 -0500
Update of /cvs-repository/Packages/Spread
In directory cvs.zope.org:/tmp/cvs-serv21288
Modified Files:
spreadmodule.c
Log Message:
Nuke all trailing whitespace, while we're at it.
=== Packages/Spread/spreadmodule.c 1.9 => 1.10 ===
static PyObject *
-new_regular_msg(PyObject *sender, int num_groups,
+new_regular_msg(PyObject *sender, int num_groups,
char (*groups)[MAX_GROUP_NAME], short msg_type,
int endian, PyObject *message, int size)
{
@@ -444,7 +444,7 @@
return NULL;
if (buf_size <= 0) {
- PyErr_SetString(PyExc_ValueError,
+ PyErr_SetString(PyExc_ValueError,
"buffer size must be greater than zero");
return NULL;
}
@@ -463,11 +463,11 @@
goto error;
Py_BEGIN_ALLOW_THREADS
- size = SP_receive(self->mbox, &svc_type, PyString_AS_STRING(sender),
+ size = SP_receive(self->mbox, &svc_type, PyString_AS_STRING(sender),
self->max_groups, &num_groups, groups, &msg_type,
&endian, buf_size, PyString_AS_STRING(message));
Py_END_ALLOW_THREADS
-
+
if (size < 0)
goto error;
@@ -480,8 +480,8 @@
strlen(PyString_AS_STRING(sender))) < 0)
goto error;
msg = new_membership_msg(svc_type, sender,
- num_groups, groups,
- PyString_AS_STRING(message));
+ num_groups, groups,
+ PyString_AS_STRING(message));
} else if (svc_type & TRANSITION_MESS) {
PyErr_SetString(PyExc_RuntimeError,
"can't handle transitional messages yet");
@@ -499,8 +499,8 @@
if (_PyString_Resize(&sender,
strlen(PyString_AS_STRING(sender))) < 0)
goto error;
- msg = new_membership_msg(svc_type, sender, num_groups, groups,
- PyString_AS_STRING(message));
+ msg = new_membership_msg(svc_type, sender, num_groups, groups,
+ PyString_AS_STRING(message));
} else {
/* XXX */
fprintf(stderr, "unexpected service type: %d\n", svc_type);
@@ -566,7 +566,7 @@
mailbox_poll(MailboxObject *self, PyObject *args)
{
int bytes;
-
+
if (!PyArg_ParseTuple(args, ":poll"))
return NULL;
@@ -600,7 +600,7 @@
mailbox_getattr(PyObject *self, char *name)
{
PyObject *meth;
-
+
meth = Py_FindMethod(Mailbox_methods, self, name);
if (meth)
return meth;
@@ -615,7 +615,7 @@
PyErr_SetString(PyExc_TypeError, "can't delete attributes");
return -1;
}
-
+
return PyMember_Set((char *)self, Mailbox_memberlist, name, value);
}
@@ -662,7 +662,7 @@
Py_BEGIN_ALLOW_THREADS
ret = SP_connect(spread_name, private_name, priority,
- membership, &_mbox,
+ membership, &_mbox,
PyString_AS_STRING(group_name));
Py_END_ALLOW_THREADS
@@ -703,7 +703,7 @@
/* Three error handling routines below */
-static void spread_too_short_error(int err, int svc_type, short msg_type,
+static void spread_too_short_error(int err, int svc_type, short msg_type,
int needed)
{
PyObject *val;
@@ -722,14 +722,14 @@
if (!reason)
return;
- val = Py_BuildValue("iNihi", err, reason, svc_type, msg_type,
+ val = Py_BuildValue("iNihi", err, reason, svc_type, msg_type,
needed < 0 ? -needed : 0);
if (val)
PyErr_SetObject(SpreadError, val);
}
/* spread_error(): helper function for setting exceptions from SP_xxx
- return value */
+ return value */
static PyObject *spread_error(int err)
{
@@ -838,7 +838,7 @@
Py_INCREF(&MembershipMsg_Type);
PyModule_AddObject(m, "MailboxType", (PyObject *)&Mailbox_Type);
PyModule_AddObject(m, "RegularMsgType", (PyObject *)&RegularMsg_Type);
- PyModule_AddObject(m, "MembershipMsgType",
+ PyModule_AddObject(m, "MembershipMsgType",
(PyObject *)&MembershipMsg_Type);
/* Add some symbolic constants to the module */
@@ -873,7 +873,7 @@
PyModule_AddIntConstant(m, "CAUSED_BY_JOIN", CAUSED_BY_JOIN);
PyModule_AddIntConstant(m, "CAUSED_BY_LEAVE", CAUSED_BY_LEAVE);
PyModule_AddIntConstant(m, "CAUSED_BY_DISCONNECT",
- CAUSED_BY_DISCONNECT);
+ CAUSED_BY_DISCONNECT);
PyModule_AddIntConstant(m, "CAUSED_BY_NETWORK", CAUSED_BY_NETWORK);
PyModule_AddIntConstant(m, "MEMBERSHIP_MESS", MEMBERSHIP_MESS);
PyModule_AddIntConstant(m, "ENDIAN_RESERVED", ENDIAN_RESERVED);