Mercurial > cpython-lru_cache-weakref
diff Python/thread.c @ 33699:0c26db381673 legacy-trunk
Style guide & consistency changes. No semantic changes.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sat, 09 Oct 2004 17:38:29 +0000 |
| parents | 28a205ecb4dd |
| children | 891042c94aed |
line wrap: on
line diff
--- a/Python/thread.c Sat Oct 09 17:25:05 2004 +0000 +++ b/Python/thread.c Sat Oct 09 17:38:29 2004 +0000 @@ -157,7 +157,8 @@ static int nkeys = 0; static PyThread_type_lock keymutex = NULL; -static struct key *find_key(int key, void *value) +static struct key * +find_key(int key, void *value) { struct key *p; long id = PyThread_get_thread_ident(); @@ -180,14 +181,16 @@ return p; } -int PyThread_create_key(void) +int +PyThread_create_key(void) { if (keymutex == NULL) keymutex = PyThread_allocate_lock(); return ++nkeys; } -void PyThread_delete_key(int key) +void +PyThread_delete_key(int key) { struct key *p, **q; PyThread_acquire_lock(keymutex, 1); @@ -204,7 +207,8 @@ PyThread_release_lock(keymutex); } -int PyThread_set_key_value(int key, void *value) +int +PyThread_set_key_value(int key, void *value) { struct key *p = find_key(key, value); if (p == NULL) @@ -213,7 +217,8 @@ return 0; } -void *PyThread_get_key_value(int key) +void * +PyThread_get_key_value(int key) { struct key *p = find_key(key, NULL); if (p == NULL) @@ -222,7 +227,8 @@ return p->value; } -void PyThread_delete_key_value(int key) +void +PyThread_delete_key_value(int key) { long id = PyThread_get_thread_ident(); struct key *p, **q;
