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
e7134aa0
Commit
e7134aa0
authored
Feb 26, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return old value of PyMac_DoYieldEnabled; -1 means do not even check for interrupts
parent
83c434b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
Mac/Modules/macosmodule.c
Mac/Modules/macosmodule.c
+6
-5
Mac/Python/macglue.c
Mac/Python/macglue.c
+9
-1
No files found.
Mac/Modules/macosmodule.c
View file @
e7134aa0
...
...
@@ -197,13 +197,13 @@ MacOS_SetScheduleTimes(PyObject *self, PyObject *args)
static
PyObject
*
MacOS_EnableAppswitch
(
PyObject
*
self
,
PyObject
*
args
)
{
int
enable
;
int
old
,
new
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
enable
))
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
new
))
return
NULL
;
PyMac_DoYieldEnabled
=
enable
;
Py
_INCREF
(
Py_None
)
;
return
Py_
None
;
old
=
PyMac_DoYieldEnabled
;
Py
Mac_DoYieldEnabled
=
new
;
return
Py_
BuildValue
(
"i"
,
old
)
;
}
...
...
@@ -246,3 +246,4 @@ MacOS_Init()
if
(
MacOS_Error
==
NULL
||
PyDict_SetItemString
(
d
,
"Error"
,
MacOS_Error
)
!=
0
)
Py_FatalError
(
"can't define MacOS.Error"
);
}
Mac/Python/macglue.c
View file @
e7134aa0
...
...
@@ -115,7 +115,12 @@ static long yield_bg = 12;
static
long
lastyield
;
static
int
in_foreground
;
int
PyMac_DoYieldEnabled
=
1
;
/* Don't do eventloop when false */
/*
** When > 0, do full scanning for events (program is not event aware)
** when == 0, only scan for Command-period
** when < 0, don't do any event scanning
*/
int
PyMac_DoYieldEnabled
=
1
;
/* Convert C to Pascal string. Returns pointer to static buffer. */
unsigned
char
*
...
...
@@ -238,6 +243,8 @@ scan_event_queue(flush)
int
PyOS_InterruptOccurred
()
{
if
(
PyMac_DoYieldEnabled
<
0
)
return
0
;
#ifdef THINK_C
scan_event_queue
(
1
);
#endif
...
...
@@ -882,3 +889,4 @@ PyMac_InitApplication()
}
Py_Main
(
argc
,
argv
);
}
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