diff options
author | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
commit | 65d5b5763c6bbd99d2e2c6b219570f4562382ff0 (patch) | |
tree | 0a909da387c751fbfe8a90bb4a5a83f59f6c86a5 /Modules/bsddbmodule.c | |
parent | 14f53a77579d411b7b3f491f45753315e40f1aa9 (diff) | |
download | cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.zip cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.gz cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.bz2 |
Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
Diffstat (limited to 'Modules/bsddbmodule.c')
-rw-r--r-- | Modules/bsddbmodule.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c index 1bb40e6..ef20624 100644 --- a/Modules/bsddbmodule.c +++ b/Modules/bsddbmodule.c @@ -57,7 +57,7 @@ typedef struct { DB *di_bsddb; int di_size; /* -1 means recompute */ #ifdef WITH_THREAD - type_lock di_lock; + PyThread_type_lock di_lock; #endif } bsddbobject; @@ -113,7 +113,7 @@ newdbhashobject(file, flags, mode, dp->di_size = -1; #ifdef WITH_THREAD - dp->di_lock = allocate_lock(); + dp->di_lock = PyThread_allocate_lock(); if (dp->di_lock == NULL) { PyErr_SetString(BsddbError, "can't allocate lock"); Py_DECREF(dp); @@ -169,7 +169,7 @@ newdbbtobject(file, flags, mode, dp->di_size = -1; #ifdef WITH_THREAD - dp->di_lock = allocate_lock(); + dp->di_lock = PyThread_allocate_lock(); if (dp->di_lock == NULL) { PyErr_SetString(BsddbError, "can't allocate lock"); Py_DECREF(dp); @@ -225,7 +225,7 @@ newdbrnobject(file, flags, mode, dp->di_size = -1; #ifdef WITH_THREAD - dp->di_lock = allocate_lock(); + dp->di_lock = PyThread_allocate_lock(); if (dp->di_lock == NULL) { PyErr_SetString(BsddbError, "can't allocate lock"); Py_DECREF(dp); @@ -242,9 +242,9 @@ bsddb_dealloc(dp) { #ifdef WITH_THREAD if (dp->di_lock) { - acquire_lock(dp->di_lock, 0); - release_lock(dp->di_lock); - free_lock(dp->di_lock); + PyThread_acquire_lock(dp->di_lock, 0); + PyThread_release_lock(dp->di_lock); + PyThread_free_lock(dp->di_lock); dp->di_lock = NULL; } #endif @@ -262,8 +262,8 @@ bsddb_dealloc(dp) } #ifdef WITH_THREAD -#define BSDDB_BGN_SAVE(_dp) Py_BEGIN_ALLOW_THREADS acquire_lock(_dp->di_lock,1); -#define BSDDB_END_SAVE(_dp) release_lock(_dp->di_lock); Py_END_ALLOW_THREADS +#define BSDDB_BGN_SAVE(_dp) Py_BEGIN_ALLOW_THREADS PyThread_acquire_lock(_dp->di_lock,1); +#define BSDDB_END_SAVE(_dp) PyThread_release_lock(_dp->di_lock); Py_END_ALLOW_THREADS #else #define BSDDB_BGN_SAVE(_dp) Py_BEGIN_ALLOW_THREADS #define BSDDB_END_SAVE(_dp) Py_END_ALLOW_THREADS |