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
ea29696f
Commit
ea29696f
authored
Jun 20, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inject CyRefCount macros
parent
b4c7b2e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+5
-0
No files found.
Cython/Compiler/Builtin.py
View file @
ea29696f
...
@@ -418,6 +418,10 @@ def init_builtin_structs():
...
@@ -418,6 +418,10 @@ def init_builtin_structs():
builtin_scope
.
declare_struct_or_union
(
builtin_scope
.
declare_struct_or_union
(
name
,
"struct"
,
scope
,
1
,
None
,
cname
=
cname
)
name
,
"struct"
,
scope
,
1
,
None
,
cname
=
cname
)
def
inject_cypclass_refcount_macros
():
macro_type
=
PyrexTypes
.
CFuncType
(
PyrexTypes
.
c_void_type
,
[
PyrexTypes
.
CFuncTypeArg
(
"obj"
,
PyrexTypes
.
cy_object_type
,
None
)],
nogil
=
1
)
for
macro
in
[
"Cy_INCREF"
,
"Cy_DECREF"
,
"Cy_XDECREF"
]:
builtin_scope
.
declare_builtin_cfunction
(
macro
,
macro_type
,
macro
)
def
init_builtins
():
def
init_builtins
():
init_builtin_structs
()
init_builtin_structs
()
...
@@ -446,6 +450,7 @@ def init_builtins():
...
@@ -446,6 +450,7 @@ def init_builtins():
float_type
=
builtin_scope
.
lookup
(
'float'
).
type
float_type
=
builtin_scope
.
lookup
(
'float'
).
type
bool_type
=
builtin_scope
.
lookup
(
'bool'
).
type
bool_type
=
builtin_scope
.
lookup
(
'bool'
).
type
complex_type
=
builtin_scope
.
lookup
(
'complex'
).
type
complex_type
=
builtin_scope
.
lookup
(
'complex'
).
type
inject_cypclass_refcount_macros
()
init_builtins
()
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