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
df9642a4
Commit
df9642a4
authored
Dec 10, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Great renaming.
Also got rid of the dummy variable, which was last needed in IRIX 4.x.
parent
eb59c671
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
Modules/sgimodule.c
Modules/sgimodule.c
+17
-23
No files found.
Modules/sgimodule.c
View file @
df9642a4
...
...
@@ -31,55 +31,52 @@ PERFORMANCE OF THIS SOFTWARE.
/* SGI module -- random SGI-specific things */
#include "allobjects.h"
#include "modsupport.h"
#include "ceval.h"
#include "Python.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
static
o
bject
*
static
PyO
bject
*
sgi_nap
(
self
,
args
)
o
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
self
;
PyO
bject
*
args
;
{
long
ticks
;
if
(
!
getargs
(
args
,
"l"
,
&
ticks
))
if
(
!
PyArg_Parse
(
args
,
"l"
,
&
ticks
))
return
NULL
;
BGN_SAVE
Py_BEGIN_ALLOW_THREADS
sginap
(
ticks
);
END_SAVE
INCREF
(
None
);
return
None
;
Py_END_ALLOW_THREADS
Py_INCREF
(
Py_
None
);
return
Py_
None
;
}
extern
char
*
_getpty
(
int
*
,
int
,
mode_t
,
int
);
static
o
bject
*
static
PyO
bject
*
sgi__getpty
(
self
,
args
)
o
bject
*
self
;
o
bject
*
args
;
PyO
bject
*
self
;
PyO
bject
*
args
;
{
int
oflag
;
int
mode
;
int
nofork
;
char
*
name
;
int
fildes
;
if
(
!
getargs
(
args
,
"(iii)"
,
&
oflag
,
&
mode
,
&
nofork
))
if
(
!
PyArg_Parse
(
args
,
"(iii)"
,
&
oflag
,
&
mode
,
&
nofork
))
return
NULL
;
errno
=
0
;
name
=
_getpty
(
&
fildes
,
oflag
,
(
mode_t
)
mode
,
nofork
);
if
(
name
==
NULL
)
{
err_errno
(
IOError
);
PyErr_SetFromErrno
(
PyExc_
IOError
);
return
NULL
;
}
return
mkv
alue
(
"(si)"
,
name
,
fildes
);
return
Py_BuildV
alue
(
"(si)"
,
name
,
fildes
);
}
static
struct
methodlist
sgi_methods
[]
=
{
static
PyMethodDef
sgi_methods
[]
=
{
{
"nap"
,
sgi_nap
},
{
"_getpty"
,
sgi__getpty
},
{
NULL
,
NULL
}
/* sentinel */
...
...
@@ -89,8 +86,5 @@ static struct methodlist sgi_methods[] = {
void
initsgi
()
{
initm
odule
(
"sgi"
,
sgi_methods
);
Py_InitM
odule
(
"sgi"
,
sgi_methods
);
}
int
_Py_sgi_dummy
;
/* $%#@!& dl wants at least a byte of bss */
/* And gcc -Wall doesn't like unused static variables :-( */
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