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
ae6315f6
Commit
ae6315f6
authored
Mar 08, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cypclass (un)starred declaration code
parent
8b04a094
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+7
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
ae6315f6
...
...
@@ -10865,7 +10865,7 @@ class SizeofTypeNode(SizeofNode):
error
(
self
.
pos
,
"Cannot take sizeof incomplete type '%s'"
%
arg_type
)
def
calculate_result_code
(
self
):
if
self
.
arg_type
.
is_extension_type
:
if
self
.
arg_type
.
is_extension_type
or
self
.
arg_type
.
is_cyp_class
:
# the size of the pointer is boring
# we want the size of the actual struct
arg_code
=
self
.
arg_type
.
declaration_code
(
""
,
deref
=
1
)
...
...
Cython/Compiler/PyrexTypes.py
View file @
ae6315f6
...
...
@@ -3893,10 +3893,15 @@ class CppClassType(CType):
class
CypClassType
(
CppClassType
):
is_cyp_class
=
1
def
empty_declaration_code
(
self
):
if
self
.
_empty_declaration
is
None
:
self
.
_empty_declaration
=
self
.
declaration_code
(
''
,
deref
=
1
)
return
self
.
_empty_declaration
def
declaration_code
(
self
,
entity_code
,
for_display
=
0
,
dll_linkage
=
None
,
pyrex
=
0
,
template_params
=
None
):
if
entity_code
:
template_params
=
None
,
deref
=
0
):
if
not
deref
:
entity_code
=
"*%s"
%
entity_code
return
super
(
CypClassType
,
self
).
declaration_code
(
entity_code
,
for_display
=
for_display
,
dll_linkage
=
dll_linkage
,
...
...
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