Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
41c36ffe
Commit
41c36ffe
authored
Jul 10, 2000
by
Peter Schneider-Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ANSI-fication
parent
416d4135
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
213 deletions
+70
-213
Modules/selectmodule.c
Modules/selectmodule.c
+4
-12
Modules/sgimodule.c
Modules/sgimodule.c
+2
-6
Modules/structmodule.c
Modules/structmodule.c
+57
-173
Modules/syslogmodule.c
Modules/syslogmodule.c
+7
-22
No files found.
Modules/selectmodule.c
View file @
41c36ffe
...
...
@@ -58,8 +58,7 @@ typedef struct {
}
pylist
;
static
void
reap_obj
(
fd2obj
)
pylist
fd2obj
[
FD_SETSIZE
+
3
];
reap_obj
(
pylist
fd2obj
[
FD_SETSIZE
+
3
])
{
int
i
;
for
(
i
=
0
;
i
<
FD_SETSIZE
+
3
&&
fd2obj
[
i
].
sentinel
>=
0
;
i
++
)
{
...
...
@@ -74,10 +73,7 @@ reap_obj(fd2obj)
returns a number >= 0
*/
static
int
list2set
(
list
,
set
,
fd2obj
)
PyObject
*
list
;
fd_set
*
set
;
pylist
fd2obj
[
FD_SETSIZE
+
3
];
list2set
(
PyObject
*
list
,
fd_set
*
set
,
pylist
fd2obj
[
FD_SETSIZE
+
3
])
{
int
i
;
int
max
=
-
1
;
...
...
@@ -155,9 +151,7 @@ list2set(list, set, fd2obj)
/* returns NULL and sets the Python exception if an error occurred */
static
PyObject
*
set2list
(
set
,
fd2obj
)
fd_set
*
set
;
pylist
fd2obj
[
FD_SETSIZE
+
3
];
set2list
(
fd_set
*
set
,
pylist
fd2obj
[
FD_SETSIZE
+
3
])
{
int
i
,
j
,
count
=
0
;
PyObject
*
list
,
*
o
;
...
...
@@ -199,9 +193,7 @@ set2list(set, fd2obj)
static
PyObject
*
select_select
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
select_select
(
PyObject
*
self
,
PyObject
*
args
)
{
#ifdef MS_WINDOWS
/* This would be an awful lot of stack space on Windows! */
...
...
Modules/sgimodule.c
View file @
41c36ffe
...
...
@@ -18,9 +18,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#include <fcntl.h>
static
PyObject
*
sgi_nap
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
sgi_nap
(
PyObject
*
self
,
PyObject
*
args
)
{
long
ticks
;
if
(
!
PyArg_Parse
(
args
,
"l"
,
&
ticks
))
...
...
@@ -35,9 +33,7 @@ sgi_nap(self, args)
extern
char
*
_getpty
(
int
*
,
int
,
mode_t
,
int
);
static
PyObject
*
sgi__getpty
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
sgi__getpty
(
PyObject
*
self
,
PyObject
*
args
)
{
int
oflag
;
int
mode
;
...
...
Modules/structmodule.c
View file @
41c36ffe
This diff is collapsed.
Click to expand it.
Modules/syslogmodule.c
View file @
41c36ffe
...
...
@@ -53,9 +53,7 @@ static PyObject *S_ident_o = NULL; /* identifier, held by openlog() */
static
PyObject
*
syslog_openlog
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_openlog
(
PyObject
*
self
,
PyObject
*
args
)
{
long
logopt
=
0
;
long
facility
=
LOG_USER
;
...
...
@@ -80,9 +78,7 @@ syslog_openlog(self, args)
static
PyObject
*
syslog_syslog
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_syslog
(
PyObject
*
self
,
PyObject
*
args
)
{
char
*
message
;
int
priority
=
LOG_INFO
;
...
...
@@ -101,9 +97,7 @@ syslog_syslog(self, args)
}
static
PyObject
*
syslog_closelog
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_closelog
(
PyObject
*
self
,
PyObject
*
args
)
{
if
(
!
PyArg_ParseTuple
(
args
,
":closelog"
))
return
NULL
;
...
...
@@ -115,9 +109,7 @@ syslog_closelog(self, args)
}
static
PyObject
*
syslog_setlogmask
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_setlogmask
(
PyObject
*
self
,
PyObject
*
args
)
{
long
maskpri
,
omaskpri
;
...
...
@@ -128,9 +120,7 @@ syslog_setlogmask(self, args)
}
static
PyObject
*
syslog_log_mask
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_log_mask
(
PyObject
*
self
,
PyObject
*
args
)
{
long
mask
;
long
pri
;
...
...
@@ -141,9 +131,7 @@ syslog_log_mask(self, args)
}
static
PyObject
*
syslog_log_upto
(
self
,
args
)
PyObject
*
self
;
PyObject
*
args
;
syslog_log_upto
(
PyObject
*
self
,
PyObject
*
args
)
{
long
mask
;
long
pri
;
...
...
@@ -168,10 +156,7 @@ static PyMethodDef syslog_methods[] = {
/* helper function for initialization function */
static
void
ins
(
d
,
s
,
x
)
PyObject
*
d
;
char
*
s
;
long
x
;
ins
(
PyObject
*
d
,
char
*
s
,
long
x
)
{
PyObject
*
v
=
PyInt_FromLong
(
x
);
if
(
v
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment