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
767c8515
Commit
767c8515
authored
Aug 02, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added finalization routines.
parent
ef74f756
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
Parser/acceler.c
Parser/acceler.c
+20
-0
Parser/intrcheck.c
Parser/intrcheck.c
+24
-1
No files found.
Parser/acceler.c
View file @
767c8515
...
...
@@ -68,6 +68,26 @@ PyGrammar_AddAccelerators(g)
#endif
}
void
PyGrammar_RemoveAccelerators
(
g
)
grammar
*
g
;
{
dfa
*
d
;
int
i
;
g
->
g_accel
=
0
;
d
=
g
->
g_dfa
;
for
(
i
=
g
->
g_ndfas
;
--
i
>=
0
;
d
++
)
{
state
*
s
;
int
j
;
s
=
d
->
d_state
;
for
(
j
=
0
;
j
<
d
->
d_nstates
;
j
++
,
s
++
)
{
if
(
s
->
s_accel
)
PyMem_DEL
(
s
->
s_accel
);
s
->
s_accel
=
NULL
;
}
}
}
static
void
fixdfa
(
g
,
d
)
grammar
*
g
;
...
...
Parser/intrcheck.c
View file @
767c8515
...
...
@@ -49,6 +49,11 @@ PyOS_InitInterrupts()
{
}
void
PyOS_FiniInterrupts
()
{
}
int
PyOS_InterruptOccurred
()
{
...
...
@@ -81,6 +86,11 @@ PyOS_InitInterrupts()
_go32_want_ctrl_break
(
1
/* TRUE */
);
}
void
PyOS_FiniInterrupts
()
{
}
int
PyOS_InterruptOccurred
()
{
...
...
@@ -96,6 +106,11 @@ PyOS_InitInterrupts()
{
}
void
PyOS_FiniInterrupts
()
{
}
int
PyOS_InterruptOccurred
()
{
...
...
@@ -170,10 +185,12 @@ intcatcher(sig)
Py_AddPendingCall
(
PyErr_CheckSignals
,
NULL
);
}
static
RETSIGTYPE
(
*
old_siginthandler
)()
=
SIG_DFL
;
void
PyOS_InitInterrupts
()
{
if
(
signal
(
SIGINT
,
SIG_IGN
)
!=
SIG_IGN
)
if
(
(
old_siginthandler
=
signal
(
SIGINT
,
SIG_IGN
)
)
!=
SIG_IGN
)
signal
(
SIGINT
,
intcatcher
);
#ifdef HAVE_SIGINTERRUPT
/* This is for SunOS and other modern BSD derivatives.
...
...
@@ -186,6 +203,12 @@ PyOS_InitInterrupts()
#endif
/* HAVE_SIGINTERRUPT */
}
void
PyOS_FiniInterrupts
()
{
signal
(
SIGINT
,
old_siginthandler
);
}
int
PyOS_InterruptOccurred
()
{
...
...
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