Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
e2a23fe1
Commit
e2a23fe1
authored
Sep 20, 2021
by
da-woods
Committed by
GitHub
Sep 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove usused "FetchCommonPointer" utility code (GH-4380)
parent
aea4e6b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
35 deletions
+0
-35
Cython/Utility/CommonStructures.c
Cython/Utility/CommonStructures.c
+0
-33
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+0
-2
No files found.
Cython/Utility/CommonStructures.c
View file @
e2a23fe1
...
...
@@ -125,36 +125,3 @@ bad:
}
#endif
/////////////// FetchCommonPointer.proto ///////////////
static
void
*
__Pyx_FetchCommonPointer
(
void
*
pointer
,
const
char
*
name
);
/////////////// FetchCommonPointer ///////////////
static
void
*
__Pyx_FetchCommonPointer
(
void
*
pointer
,
const
char
*
name
)
{
PyObject
*
abi_module
=
NULL
;
PyObject
*
capsule
=
NULL
;
void
*
value
=
NULL
;
abi_module
=
PyImport_AddModule
((
char
*
)
__PYX_ABI_MODULE_NAME
);
if
(
!
abi_module
)
return
NULL
;
Py_INCREF
(
abi_module
);
capsule
=
PyObject_GetAttrString
(
abi_module
,
name
);
if
(
!
capsule
)
{
if
(
!
PyErr_ExceptionMatches
(
PyExc_AttributeError
))
goto
bad
;
PyErr_Clear
();
capsule
=
PyCapsule_New
(
pointer
,
name
,
NULL
);
if
(
!
capsule
)
goto
bad
;
if
(
PyObject_SetAttrString
(
abi_module
,
name
,
capsule
)
<
0
)
goto
bad
;
}
value
=
PyCapsule_GetPointer
(
capsule
,
name
);
bad:
Py_XDECREF
(
capsule
);
Py_DECREF
(
abi_module
);
return
value
;
}
Cython/Utility/ModuleSetupCode.c
View file @
e2a23fe1
...
...
@@ -1678,7 +1678,6 @@ static void __Pyx_FastGilFuncInit(void);
#endif
/////////////// FastGil ///////////////
//@requires: CommonStructures.c::FetchCommonPointer
// The implementations of PyGILState_Ensure/Release calls PyThread_get_key_value
// several times which is turns out to be quite slow (slower in fact than
// acquiring the GIL itself). Simply storing it in a thread local for the
...
...
@@ -1780,7 +1779,6 @@ static void __Pyx_FastGilFuncInit0(void) {
#else
static
void
__Pyx_FastGilFuncInit0
(
void
)
{
CYTHON_UNUSED_VAR
(
&
__Pyx_FetchCommonPointer
);
}
#endif
...
...
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