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
625cb379
Commit
625cb379
authored
Sep 05, 2016
by
Zachary Ware
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #25387: Check return value of winsound.MessageBeep
parent
cefebf3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
Doc/library/winsound.rst
Doc/library/winsound.rst
+2
-1
Misc/NEWS
Misc/NEWS
+2
-0
PC/winsound.c
PC/winsound.c
+11
-1
No files found.
Doc/library/winsound.rst
View file @
625cb379
...
...
@@ -40,7 +40,8 @@ provided by Windows platforms. It includes functions and several constants.
sound to play; possible values are ``-1``, ``MB_ICONASTERISK``,
``MB_ICONEXCLAMATION``, ``MB_ICONHAND``, ``MB_ICONQUESTION``, and ``MB_OK``, all
described below. The value ``-1`` produces a "simple beep"; this is the final
fallback if a sound cannot be played otherwise.
fallback if a sound cannot be played otherwise. If the system indicates an
error, :exc:`RuntimeError` is raised.
.. data:: SND_FILENAME
...
...
Misc/NEWS
View file @
625cb379
...
...
@@ -80,6 +80,8 @@ Core and Builtins
Library
-------
- Issue #25387: Check return value of winsound.MessageBeep.
- Issue #27866: Add SSLContext.get_ciphers() method to get a list of all
enabled ciphers.
...
...
PC/winsound.c
View file @
625cb379
...
...
@@ -175,7 +175,17 @@ static PyObject *
winsound_MessageBeep_impl
(
PyObject
*
module
,
int
x
)
/*[clinic end generated code: output=1ad89e4d8d30a957 input=a776c8a85c9853f6]*/
{
MessageBeep
(
x
);
BOOL
ok
;
Py_BEGIN_ALLOW_THREADS
ok
=
MessageBeep
(
x
);
Py_END_ALLOW_THREADS
if
(
!
ok
)
{
PyErr_SetExcFromWindowsErr
(
PyExc_RuntimeError
,
0
);
return
NULL
;
}
Py_RETURN_NONE
;
}
...
...
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