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
47c9246c
Commit
47c9246c
authored
Jun 19, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regroup and cleanup CypclassWrapper.py imports
parent
8a6cee25
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
114 deletions
+79
-114
Cython/Compiler/CypclassWrapper.py
Cython/Compiler/CypclassWrapper.py
+72
-110
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-4
Cython/Compiler/Naming.py
Cython/Compiler/Naming.py
+3
-0
No files found.
Cython/Compiler/CypclassWrapper.py
View file @
47c9246c
This diff is collapsed.
Click to expand it.
Cython/Compiler/ModuleNode.py
View file @
47c9246c
...
...
@@ -20,7 +20,6 @@ from .PyrexTypes import CPtrType
from
.
import
Future
from
.
import
Annotate
from
.
import
Code
from
.
import
CypclassWrapper
from
.
import
Naming
from
.
import
Nodes
from
.
import
Options
...
...
@@ -663,12 +662,13 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
self
.
generate_exttype_vtable_struct
(
entry
,
code
)
self
.
generate_exttype_vtabptr_declaration
(
entry
,
code
)
self
.
generate_exttype_final_methods_declaration
(
entry
,
code
)
from
.CypclassWrapper
import
generate_cyp_class_deferred_definitions
for
module
in
modules
:
definition
=
module
is
env
code
.
putln
(
""
)
code
.
putln
(
"/* Deferred definitions for cypclasses */"
)
CypclassWrapper
.
generate_cyp_class_deferred_definitions
(
env
,
code
,
definition
)
generate_cyp_class_deferred_definitions
(
env
,
code
,
definition
)
def
generate_declarations_for_modules
(
self
,
env
,
modules
,
globalstate
):
typecode
=
globalstate
[
'type_declarations'
]
...
...
@@ -1686,7 +1686,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# for cyp wrappers, just decrement the atomic counter of the underlying type
parent_type
=
scope
.
parent_type
if
parent_type
.
is_cyp_wrapper
:
underlying_attribute_name
=
CypclassWrapper
.
underlying_
name
underlying_attribute_name
=
Naming
.
cypclass_attr_c
name
self
.
generate_self_cast
(
scope
,
code
)
code
.
putln
(
"CyObject * p_nogil_cyobject = p->%s;"
...
...
Cython/Compiler/Naming.py
View file @
47c9246c
...
...
@@ -166,6 +166,9 @@ exc_vars = (exc_type_name, exc_value_name, exc_tb_name)
api_name
=
pyrex_prefix
+
"capi__"
# c name for underlying cypclass attribute in cypclass wrappers
cypclass_attr_cname
=
"nogil_cyobject"
# the h and api guards get changed to:
# __PYX_HAVE__FILENAME (for ascii filenames)
# __PYX_HAVE_U_PUNYCODEFILENAME (for non-ascii filenames)
...
...
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