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
009a6928
Commit
009a6928
authored
Oct 23, 2019
by
Zackery Spytz
Committed by
Steve Dower
Oct 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37025: AddRefActCtx() shouldn't be checked for failure (GH-16897)
AddRefActCtx() does not return a value.
parent
9978a955
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Misc/NEWS.d/next/Windows/2019-10-04-03-46-36.bpo-37025.tLheEe.rst
...S.d/next/Windows/2019-10-04-03-46-36.bpo-37025.tLheEe.rst
+2
-0
PC/dl_nt.c
PC/dl_nt.c
+10
-5
No files found.
Misc/NEWS.d/next/Windows/2019-10-04-03-46-36.bpo-37025.tLheEe.rst
0 → 100644
View file @
009a6928
``AddRefActCtx()`` was needlessly being checked for failure in
``PC/dl_nt.c``.
PC/dl_nt.c
View file @
009a6928
...
@@ -33,8 +33,8 @@ const char *PyWin_DLLVersionString = dllVersionBuffer;
...
@@ -33,8 +33,8 @@ const char *PyWin_DLLVersionString = dllVersionBuffer;
typedef
BOOL
(
WINAPI
*
PFN_GETCURRENTACTCTX
)(
HANDLE
*
);
typedef
BOOL
(
WINAPI
*
PFN_GETCURRENTACTCTX
)(
HANDLE
*
);
typedef
BOOL
(
WINAPI
*
PFN_ACTIVATEACTCTX
)(
HANDLE
,
ULONG_PTR
*
);
typedef
BOOL
(
WINAPI
*
PFN_ACTIVATEACTCTX
)(
HANDLE
,
ULONG_PTR
*
);
typedef
BOOL
(
WINAPI
*
PFN_DEACTIVATEACTCTX
)(
DWORD
,
ULONG_PTR
);
typedef
BOOL
(
WINAPI
*
PFN_DEACTIVATEACTCTX
)(
DWORD
,
ULONG_PTR
);
typedef
BOOL
(
WINAPI
*
PFN_ADDREFACTCTX
)(
HANDLE
);
typedef
void
(
WINAPI
*
PFN_ADDREFACTCTX
)(
HANDLE
);
typedef
BOOL
(
WINAPI
*
PFN_RELEASEACTCTX
)(
HANDLE
);
typedef
void
(
WINAPI
*
PFN_RELEASEACTCTX
)(
HANDLE
);
// locals and function pointers for this activation context magic.
// locals and function pointers for this activation context magic.
static
HANDLE
PyWin_DLLhActivationContext
=
NULL
;
// one day it might be public
static
HANDLE
PyWin_DLLhActivationContext
=
NULL
;
// one day it might be public
...
@@ -90,9 +90,14 @@ BOOL WINAPI DllMain (HANDLE hInst,
...
@@ -90,9 +90,14 @@ BOOL WINAPI DllMain (HANDLE hInst,
// and capture our activation context for use when loading extensions.
// and capture our activation context for use when loading extensions.
_LoadActCtxPointers
();
_LoadActCtxPointers
();
if
(
pfnGetCurrentActCtx
&&
pfnAddRefActCtx
)
if
(
pfnGetCurrentActCtx
&&
pfnAddRefActCtx
)
if
((
*
pfnGetCurrentActCtx
)(
&
PyWin_DLLhActivationContext
))
if
((
*
pfnGetCurrentActCtx
)(
&
PyWin_DLLhActivationContext
))
{
if
(
!
(
*
pfnAddRefActCtx
)(
PyWin_DLLhActivationContext
))
(
*
pfnAddRefActCtx
)(
PyWin_DLLhActivationContext
);
OutputDebugString
(
"Python failed to load the default activation context
\n
"
);
}
else
{
OutputDebugString
(
"Python failed to load the default "
"activation context
\n
"
);
return
FALSE
;
}
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
...
...
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