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/socketmodule.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/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 0564e17..ab0014c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -313,7 +313,7 @@ BUILD_FUNC_DEF_4(PySocketSock_New,int,fd, int,family, int,type, int,proto) /* Lock to allow python interpreter to continue, but only allow one thread to be in gethostbyname */ #if defined(WITH_THREAD) && !defined(HAVE_GETHOSTBYNAME_R) && !defined(MS_WINDOWS) -type_lock gethostbyname_lock; +PyThread_type_lock gethostbyname_lock; #endif @@ -358,11 +358,11 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret) hp = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop); #else /* not HAVE_GETHOSTBYNAME_R */ #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - acquire_lock(gethostbyname_lock,1); + PyThread_acquire_lock(gethostbyname_lock,1); #endif hp = gethostbyname(name); #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - release_lock(gethostbyname_lock); + PyThread_release_lock(gethostbyname_lock); #endif #endif /* HAVE_GETHOSTBYNAME_R */ Py_END_ALLOW_THREADS @@ -1417,11 +1417,11 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyname_ex,PyObject *,self, PyObject *,args) h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop); #else /* not HAVE_GETHOSTBYNAME_R */ #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - acquire_lock(gethostbyname_lock,1); + PyThread_acquire_lock(gethostbyname_lock,1); #endif h = gethostbyname(name); #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - release_lock(gethostbyname_lock); + PyThread_release_lock(gethostbyname_lock); #endif #endif /* HAVE_GETHOSTBYNAME_R */ Py_END_ALLOW_THREADS @@ -1463,13 +1463,13 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args) &hp_allocated, buf, buf_len, &errnop); #else /* not HAVE_GETHOSTBYNAME_R */ #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - acquire_lock(gethostbyname_lock,1); + PyThread_acquire_lock(gethostbyname_lock,1); #endif h = gethostbyaddr((char *)&addr.sin_addr, sizeof(addr.sin_addr), AF_INET); #if defined(WITH_THREAD) && !defined(MS_WINDOWS) - release_lock(gethostbyname_lock); + PyThread_release_lock(gethostbyname_lock); #endif #endif /* HAVE_GETHOSTBYNAME_R */ Py_END_ALLOW_THREADS @@ -2188,6 +2188,6 @@ initsocket() /* Initialize gethostbyname lock */ #if defined(WITH_THREAD) && !defined(HAVE_GETHOSTBYNAME_R) && !defined(MS_WINDOWS) - gethostbyname_lock = allocate_lock(); + gethostbyname_lock = PyThread_allocate_lock(); #endif } |