]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
almodule.c: added close method, equivalent to closeport.
authorSjoerd Mullender <sjoerd@acm.org>
Mon, 20 Dec 1993 17:26:34 +0000 (17:26 +0000)
committerSjoerd Mullender <sjoerd@acm.org>
Mon, 20 Dec 1993 17:26:34 +0000 (17:26 +0000)
thread.h: use PROTO instead of _P for prototypes.

Include/pythread.h
Include/thread.h
Modules/almodule.c

index e29f7e63bfec41c7da54761cac4e246cb490ccb9..806882f2df41ede2519ffb0c13163a22f0672a83 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef _THREAD_H_included
 #define _THREAD_H_included
 
+#ifndef PROTO
 #if defined(__STDC__) || defined(__cplusplus)
-#define _P(args)       args
+#define PROTO(args)    args
 #else
-#define _P(args)       ()
+#define PROTO(args)    ()
+#endif
 #endif
 
 typedef void *type_lock;
@@ -14,30 +16,28 @@ typedef void *type_sema;
 extern "C" {
 #endif
 
-void init_thread _P((void));
-int start_new_thread _P((void (*)(void *), void *));
-void exit_thread _P((void));
-void _exit_thread _P((void));
+void init_thread PROTO((void));
+int start_new_thread PROTO((void (*)(void *), void *));
+void exit_thread PROTO((void));
+void _exit_thread PROTO((void));
 
-type_lock allocate_lock _P((void));
-void free_lock _P((type_lock));
-int acquire_lock _P((type_lock, int));
+type_lock allocate_lock PROTO((void));
+void free_lock PROTO((type_lock));
+int acquire_lock PROTO((type_lock, int));
 #define WAIT_LOCK      1
 #define NOWAIT_LOCK    0
-void release_lock _P((type_lock));
+void release_lock PROTO((type_lock));
 
-type_sema allocate_sema _P((int));
-void free_sema _P((type_sema));
-void down_sema _P((type_sema));
-void up_sema _P((type_sema));
+type_sema allocate_sema PROTO((int));
+void free_sema PROTO((type_sema));
+void down_sema PROTO((type_sema));
+void up_sema PROTO((type_sema));
 
-void exit_prog _P((int));
-void _exit_prog _P((int));
+void exit_prog PROTO((int));
+void _exit_prog PROTO((int));
 
 #ifdef __cplusplus
 }
 #endif
 
-#undef _P
-
 #endif
index e29f7e63bfec41c7da54761cac4e246cb490ccb9..806882f2df41ede2519ffb0c13163a22f0672a83 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef _THREAD_H_included
 #define _THREAD_H_included
 
+#ifndef PROTO
 #if defined(__STDC__) || defined(__cplusplus)
-#define _P(args)       args
+#define PROTO(args)    args
 #else
-#define _P(args)       ()
+#define PROTO(args)    ()
+#endif
 #endif
 
 typedef void *type_lock;
@@ -14,30 +16,28 @@ typedef void *type_sema;
 extern "C" {
 #endif
 
-void init_thread _P((void));
-int start_new_thread _P((void (*)(void *), void *));
-void exit_thread _P((void));
-void _exit_thread _P((void));
+void init_thread PROTO((void));
+int start_new_thread PROTO((void (*)(void *), void *));
+void exit_thread PROTO((void));
+void _exit_thread PROTO((void));
 
-type_lock allocate_lock _P((void));
-void free_lock _P((type_lock));
-int acquire_lock _P((type_lock, int));
+type_lock allocate_lock PROTO((void));
+void free_lock PROTO((type_lock));
+int acquire_lock PROTO((type_lock, int));
 #define WAIT_LOCK      1
 #define NOWAIT_LOCK    0
-void release_lock _P((type_lock));
+void release_lock PROTO((type_lock));
 
-type_sema allocate_sema _P((int));
-void free_sema _P((type_sema));
-void down_sema _P((type_sema));
-void up_sema _P((type_sema));
+type_sema allocate_sema PROTO((int));
+void free_sema PROTO((type_sema));
+void down_sema PROTO((type_sema));
+void up_sema PROTO((type_sema));
 
-void exit_prog _P((int));
-void _exit_prog _P((int));
+void exit_prog PROTO((int));
+void _exit_prog PROTO((int));
 
 #ifdef __cplusplus
 }
 #endif
 
-#undef _P
-
 #endif
index 26bf38f088800b9855959bf67d2ac1d20fc1a0c9..d731eff16e48aa734126c56c04fd1d30a1e779bc 100644 (file)
@@ -490,6 +490,7 @@ al_getstatus (self, args)
 
 static struct methodlist port_methods[] = {
        {"closeport",           al_closeport},
+       {"close",               al_closeport},
        {"getfd",               al_getfd},
         {"fileno",             al_getfd},
        {"getfilled",           al_getfilled},