mirror of
https://github.com/python/cpython
synced 2026-09-29 09:40:29 +03:00
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
declarations yet, those come later.
This commit is contained in:
parent
0452d1f316
commit
f70ef4f860
45 changed files with 704 additions and 1526 deletions
|
|
@ -43,7 +43,7 @@ typedef struct {
|
|||
* Initialization.
|
||||
*/
|
||||
|
||||
static void PyThread__init_thread _P0()
|
||||
static void PyThread__init_thread(void)
|
||||
{
|
||||
pth_init();
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ static void PyThread__init_thread _P0()
|
|||
*/
|
||||
|
||||
|
||||
int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
|
||||
int PyThread_start_new_thread(void (*func)(void *), void *arg)
|
||||
{
|
||||
pth_t th;
|
||||
int success;
|
||||
|
|
@ -62,14 +62,14 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar
|
|||
PyThread_init_thread();
|
||||
|
||||
th = pth_spawn(PTH_ATTR_DEFAULT,
|
||||
(void* (*)_P((void *)))func,
|
||||
(void* (*)(void *))func,
|
||||
(void *)arg
|
||||
);
|
||||
|
||||
return th == NULL ? 0 : 1;
|
||||
}
|
||||
|
||||
long PyThread_get_thread_ident _P0()
|
||||
long PyThread_get_thread_ident(void)
|
||||
{
|
||||
volatile pth_t threadid;
|
||||
if (!initialized)
|
||||
|
|
@ -79,7 +79,7 @@ long PyThread_get_thread_ident _P0()
|
|||
return (long) *(long *) &threadid;
|
||||
}
|
||||
|
||||
static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup)
|
||||
static void do_PyThread_exit_thread(int no_cleanup)
|
||||
{
|
||||
dprintf(("PyThread_exit_thread called\n"));
|
||||
if (!initialized) {
|
||||
|
|
@ -90,18 +90,18 @@ static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup)
|
|||
}
|
||||
}
|
||||
|
||||
void PyThread_exit_thread _P0()
|
||||
void PyThread_exit_thread(void)
|
||||
{
|
||||
do_PyThread_exit_thread(0);
|
||||
}
|
||||
|
||||
void PyThread__exit_thread _P0()
|
||||
void PyThread__exit_thread(void)
|
||||
{
|
||||
do_PyThread_exit_thread(1);
|
||||
}
|
||||
|
||||
#ifndef NO_EXIT_PROG
|
||||
static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup)
|
||||
static void do_PyThread_exit_prog(int status, int no_cleanup)
|
||||
{
|
||||
dprintf(("PyThread_exit_prog(%d) called\n", status));
|
||||
if (!initialized)
|
||||
|
|
@ -111,12 +111,12 @@ static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cle
|
|||
exit(status);
|
||||
}
|
||||
|
||||
void PyThread_exit_prog _P1(status, int status)
|
||||
void PyThread_exit_prog(int status)
|
||||
{
|
||||
do_PyThread_exit_prog(status, 0);
|
||||
}
|
||||
|
||||
void PyThread__exit_prog _P1(status, int status)
|
||||
void PyThread__exit_prog(int status)
|
||||
{
|
||||
do_PyThread_exit_prog(status, 1);
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ void PyThread__exit_prog _P1(status, int status)
|
|||
/*
|
||||
* Lock support.
|
||||
*/
|
||||
PyThread_type_lock PyThread_allocate_lock _P0()
|
||||
PyThread_type_lock PyThread_allocate_lock(void)
|
||||
{
|
||||
pth_lock *lock;
|
||||
int status, error = 0;
|
||||
|
|
@ -151,7 +151,7 @@ PyThread_type_lock PyThread_allocate_lock _P0()
|
|||
return (PyThread_type_lock) lock;
|
||||
}
|
||||
|
||||
void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
|
||||
void PyThread_free_lock(PyThread_type_lock lock)
|
||||
{
|
||||
pth_lock *thelock = (pth_lock *)lock;
|
||||
int status, error = 0;
|
||||
|
|
@ -161,7 +161,7 @@ void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
|
|||
free((void *)thelock);
|
||||
}
|
||||
|
||||
int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag)
|
||||
int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
|
||||
{
|
||||
int success;
|
||||
pth_lock *thelock = (pth_lock *)lock;
|
||||
|
|
@ -198,7 +198,7 @@ int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitf
|
|||
return success;
|
||||
}
|
||||
|
||||
void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
|
||||
void PyThread_release_lock(PyThread_type_lock lock)
|
||||
{
|
||||
pth_lock *thelock = (pth_lock *)lock;
|
||||
int status, error = 0;
|
||||
|
|
@ -228,7 +228,7 @@ struct semaphore {
|
|||
int value;
|
||||
};
|
||||
|
||||
PyThread_type_sema PyThread_allocate_sema _P1(value, int value)
|
||||
PyThread_type_sema PyThread_allocate_sema(int value)
|
||||
{
|
||||
struct semaphore *sema;
|
||||
int status, error = 0;
|
||||
|
|
@ -253,7 +253,7 @@ PyThread_type_sema PyThread_allocate_sema _P1(value, int value)
|
|||
return (PyThread_type_sema) sema;
|
||||
}
|
||||
|
||||
void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
|
||||
void PyThread_free_sema(PyThread_type_sema sema)
|
||||
{
|
||||
int status, error = 0;
|
||||
struct semaphore *thesema = (struct semaphore *) sema;
|
||||
|
|
@ -262,7 +262,7 @@ void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
|
|||
free((void *) thesema);
|
||||
}
|
||||
|
||||
int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
|
||||
int PyThread_down_sema(PyThread_type_sema sema, int waitflag)
|
||||
{
|
||||
int status, error = 0, success;
|
||||
struct semaphore *thesema = (struct semaphore *) sema;
|
||||
|
|
@ -291,7 +291,7 @@ int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag
|
|||
return success;
|
||||
}
|
||||
|
||||
void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
|
||||
void PyThread_up_sema(PyThread_type_sema sema)
|
||||
{
|
||||
int status, error = 0;
|
||||
struct semaphore *thesema = (struct semaphore *) sema;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue