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
Gwenaël Samain
cython
Commits
e8680493
Commit
e8680493
authored
5 years ago
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cypclass (un)starred declaration code
parent
dd1c4c74
No related merge requests found
Changes
2
Show 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 @
e8680493
...
@@ -10939,7 +10939,7 @@ class SizeofTypeNode(SizeofNode):
...
@@ -10939,7 +10939,7 @@ class SizeofTypeNode(SizeofNode):
error
(
self
.
pos
,
"Cannot take sizeof incomplete type '%s'"
%
arg_type
)
error
(
self
.
pos
,
"Cannot take sizeof incomplete type '%s'"
%
arg_type
)
def
calculate_result_code
(
self
):
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
# the size of the pointer is boring
# we want the size of the actual struct
# we want the size of the actual struct
arg_code
=
self
.
arg_type
.
declaration_code
(
""
,
deref
=
1
)
arg_code
=
self
.
arg_type
.
declaration_code
(
""
,
deref
=
1
)
...
...
This diff is collapsed.
Click to expand it.
Cython/Compiler/PyrexTypes.py
View file @
e8680493
...
@@ -3893,10 +3893,15 @@ class CppClassType(CType):
...
@@ -3893,10 +3893,15 @@ class CppClassType(CType):
class
CypClassType
(
CppClassType
):
class
CypClassType
(
CppClassType
):
is_cyp_class
=
1
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
,
def
declaration_code
(
self
,
entity_code
,
for_display
=
0
,
dll_linkage
=
None
,
pyrex
=
0
,
for_display
=
0
,
dll_linkage
=
None
,
pyrex
=
0
,
template_params
=
None
):
template_params
=
None
,
deref
=
0
):
if
entity_code
:
if
not
deref
:
entity_code
=
"*%s"
%
entity_code
entity_code
=
"*%s"
%
entity_code
return
super
(
CypClassType
,
self
).
declaration_code
(
entity_code
,
return
super
(
CypClassType
,
self
).
declaration_code
(
entity_code
,
for_display
=
for_display
,
dll_linkage
=
dll_linkage
,
for_display
=
for_display
,
dll_linkage
=
dll_linkage
,
...
...
This diff is collapsed.
Click to expand it.
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