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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
f3726eb9
Commit
f3726eb9
authored
Jun 20, 2019
by
gsamain
Committed by
Xavier Thompson
Aug 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inject cylock macros in builtins
parent
29cf967f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+6
-0
No files found.
Cython/Compiler/Builtin.py
View file @
f3726eb9
...
...
@@ -423,6 +423,11 @@ def inject_cypclass_refcount_macros():
for
macro
in
[
"Cy_INCREF"
,
"Cy_DECREF"
,
"Cy_XDECREF"
]:
builtin_scope
.
declare_builtin_cfunction
(
macro
,
macro_type
,
macro
)
def
inject_cypclass_lock_macros
():
blocking_macro_type
=
PyrexTypes
.
CFuncType
(
PyrexTypes
.
c_void_type
,
[
PyrexTypes
.
CFuncTypeArg
(
"obj"
,
PyrexTypes
.
cy_object_type
,
None
)],
nogil
=
1
)
for
macro
in
(
"Cy_RLOCK"
,
"Cy_WLOCK"
,
"Cy_UNLOCK"
):
builtin_scope
.
declare_builtin_cfunction
(
macro
,
blocking_macro_type
,
macro
)
def
init_builtins
():
init_builtin_structs
()
init_builtin_types
()
...
...
@@ -451,6 +456,7 @@ def init_builtins():
bool_type
=
builtin_scope
.
lookup
(
'bool'
).
type
complex_type
=
builtin_scope
.
lookup
(
'complex'
).
type
inject_cypclass_refcount_macros
()
inject_cypclass_lock_macros
()
init_builtins
()
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