Commit 3707efef authored by Peter Schneider-Kamp's avatar Peter Schneider-Kamp

ANSI-fication

parent a788a7f0
...@@ -50,8 +50,7 @@ newlockobject() ...@@ -50,8 +50,7 @@ newlockobject()
} }
static void static void
lock_dealloc(self) lock_dealloc(lockobject *self)
lockobject *self;
{ {
/* Unlock the lock so it's safe to free it */ /* Unlock the lock so it's safe to free it */
PyThread_acquire_lock(self->lock_lock, 0); PyThread_acquire_lock(self->lock_lock, 0);
...@@ -62,9 +61,7 @@ lock_dealloc(self) ...@@ -62,9 +61,7 @@ lock_dealloc(self)
} }
static PyObject * static PyObject *
lock_PyThread_acquire_lock(self, args) lock_PyThread_acquire_lock(lockobject *self, PyObject *args)
lockobject *self;
PyObject *args;
{ {
int i; int i;
...@@ -99,9 +96,7 @@ and the return value reflects whether the lock is acquired.\n\ ...@@ -99,9 +96,7 @@ and the return value reflects whether the lock is acquired.\n\
The blocking operation is not interruptible."; The blocking operation is not interruptible.";
static PyObject * static PyObject *
lock_PyThread_release_lock(self, args) lock_PyThread_release_lock(lockobject *self, PyObject *args)
lockobject *self;
PyObject *args;
{ {
if (!PyArg_NoArgs(args)) if (!PyArg_NoArgs(args))
return NULL; return NULL;
...@@ -127,9 +122,7 @@ the lock to acquire the lock. The lock must be in the locked state,\n\ ...@@ -127,9 +122,7 @@ the lock to acquire the lock. The lock must be in the locked state,\n\
but it needn't be locked by the same thread that unlocks it."; but it needn't be locked by the same thread that unlocks it.";
static PyObject * static PyObject *
lock_locked_lock(self, args) lock_locked_lock(lockobject *self, PyObject *args)
lockobject *self;
PyObject *args;
{ {
if (!PyArg_NoArgs(args)) if (!PyArg_NoArgs(args))
return NULL; return NULL;
...@@ -158,9 +151,7 @@ static PyMethodDef lock_methods[] = { ...@@ -158,9 +151,7 @@ static PyMethodDef lock_methods[] = {
}; };
static PyObject * static PyObject *
lock_getattr(self, name) lock_getattr(lockobject *self, char *name)
lockobject *self;
char *name;
{ {
return Py_FindMethod(lock_methods, (PyObject *)self, name); return Py_FindMethod(lock_methods, (PyObject *)self, name);
} }
...@@ -191,8 +182,7 @@ struct bootstate { ...@@ -191,8 +182,7 @@ struct bootstate {
}; };
static void static void
t_bootstrap(boot_raw) t_bootstrap(void *boot_raw)
void *boot_raw;
{ {
struct bootstate *boot = (struct bootstate *) boot_raw; struct bootstate *boot = (struct bootstate *) boot_raw;
PyThreadState *tstate; PyThreadState *tstate;
...@@ -223,9 +213,7 @@ t_bootstrap(boot_raw) ...@@ -223,9 +213,7 @@ t_bootstrap(boot_raw)
} }
static PyObject * static PyObject *
thread_PyThread_start_new_thread(self, fargs) thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs)
PyObject *self; /* Not used */
PyObject *fargs;
{ {
PyObject *func, *args = NULL, *keyw = NULL; PyObject *func, *args = NULL, *keyw = NULL;
struct bootstate *boot; struct bootstate *boot;
...@@ -282,9 +270,7 @@ unhandled exception; a stack trace will be printed unless the exception is\n\ ...@@ -282,9 +270,7 @@ unhandled exception; a stack trace will be printed unless the exception is\n\
SystemExit."; SystemExit.";
static PyObject * static PyObject *
thread_PyThread_exit_thread(self, args) thread_PyThread_exit_thread(PyObject *self, PyObject *args)
PyObject *self; /* Not used */
PyObject *args;
{ {
if (!PyArg_NoArgs(args)) if (!PyArg_NoArgs(args))
return NULL; return NULL;
...@@ -301,9 +287,7 @@ thread to exit silently unless the exception is caught."; ...@@ -301,9 +287,7 @@ thread to exit silently unless the exception is caught.";
#ifndef NO_EXIT_PROG #ifndef NO_EXIT_PROG
static PyObject * static PyObject *
thread_PyThread_exit_prog(self, args) thread_PyThread_exit_prog(PyObject *self, PyObject *args)
PyObject *self; /* Not used */
PyObject *args;
{ {
int sts; int sts;
if (!PyArg_Parse(args, "i", &sts)) if (!PyArg_Parse(args, "i", &sts))
...@@ -314,9 +298,7 @@ thread_PyThread_exit_prog(self, args) ...@@ -314,9 +298,7 @@ thread_PyThread_exit_prog(self, args)
#endif #endif
static PyObject * static PyObject *
thread_PyThread_allocate_lock(self, args) thread_PyThread_allocate_lock(PyObject *self, PyObject *args)
PyObject *self; /* Not used */
PyObject *args;
{ {
if (!PyArg_NoArgs(args)) if (!PyArg_NoArgs(args))
return NULL; return NULL;
...@@ -330,9 +312,7 @@ static char allocate_doc[] = ...@@ -330,9 +312,7 @@ static char allocate_doc[] =
Create a new lock object. See LockType.__doc__ for information about locks."; Create a new lock object. See LockType.__doc__ for information about locks.";
static PyObject * static PyObject *
thread_get_ident(self, args) thread_get_ident(PyObject *self, PyObject *args)
PyObject *self; /* Not used */
PyObject *args;
{ {
long ident; long ident;
if (!PyArg_NoArgs(args)) if (!PyArg_NoArgs(args))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment