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
Boxiang Sun
cython
Commits
dc7a4af6
Commit
dc7a4af6
authored
Mar 15, 2010
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use unmangled objstruct cname for ctypedef public classes
parent
8cda3988
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-6
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+3
-3
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+0
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
dc7a4af6
...
...
@@ -227,7 +227,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
h_code
.
putln
(
"%s DL_IMPORT(PyTypeObject) %s;"
%
(
Naming
.
extern_c_macro
,
type
.
typeobj_cname
))
#self.generate_obj_struct_definition(type, h_code)
def
generate_cclass_include_code
(
self
,
type
,
i_code
):
i_code
.
putln
(
"cdef extern class %s.%s:"
%
(
...
...
@@ -390,9 +389,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
elif
type
.
is_enum
:
self
.
generate_enum_definition
(
entry
,
code
)
elif
type
.
is_extension_type
and
entry
not
in
vtabslot_entries
:
self
.
generate_obj
_
struct_definition
(
type
,
code
)
self
.
generate_objstruct_definition
(
type
,
code
)
for
entry
in
vtabslot_list
:
self
.
generate_obj
_
struct_definition
(
entry
.
type
,
code
)
self
.
generate_objstruct_definition
(
entry
.
type
,
code
)
for
entry
in
vtab_list
:
self
.
generate_typeobject_predeclaration
(
entry
,
code
)
self
.
generate_exttype_vtable_struct
(
entry
,
code
)
...
...
@@ -658,7 +657,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
elif
type
.
is_enum
:
self
.
generate_enum_definition
(
entry
,
code
)
elif
type
.
is_extension_type
:
self
.
generate_obj
_
struct_definition
(
type
,
code
)
self
.
generate_objstruct_definition
(
type
,
code
)
def
generate_gcc33_hack
(
self
,
env
,
code
):
# Workaround for spurious warning generation in gcc 3.3
...
...
@@ -804,7 +803,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
type
.
vtabstruct_cname
,
type
.
vtabptr_cname
))
def
generate_obj
_
struct_definition
(
self
,
type
,
code
):
def
generate_objstruct_definition
(
self
,
type
,
code
):
code
.
mark_pos
(
type
.
pos
)
# Generate object struct definition for an
# extension type.
...
...
@@ -1509,7 +1508,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
type
.
typedef_flag
:
objstruct
=
type
.
objstruct_cname
else
:
#objstruct = "struct %s" % scope.parent_type.objstruct_cname
objstruct
=
"struct %s"
%
type
.
objstruct_cname
code
.
putln
(
"sizeof(%s), /*tp_basicsize*/"
%
...
...
Cython/Compiler/PyrexTypes.py
View file @
dc7a4af6
...
...
@@ -517,10 +517,10 @@ class PyExtensionType(PyObjectType):
return
self
.
base_declaration_code
(
self
.
name
,
entity_code
)
else
:
if
self
.
typedef_flag
:
base_format
=
"%s"
objstruct
=
self
.
objstruct_cname
else
:
base_format
=
"struct %s"
base
=
public_decl
(
base_format
%
self
.
objstruct_cname
,
dll_linkage
)
objstruct
=
"struct %s"
%
self
.
objstruct_cname
base
=
public_decl
(
objstruct
,
dll_linkage
)
if
deref
:
return
"%s %s"
%
(
base
,
entity_code
)
else
:
...
...
Cython/Compiler/Symtab.py
View file @
dc7a4af6
...
...
@@ -948,7 +948,6 @@ class ModuleScope(Scope):
if visibility != 'public':
warning(pos, "
ctypedef
only
valid
for
public
and
extern
classes
", 2)
objtypedef_cname = objstruct_cname
objstruct_cname = None
typedef_flag = 0
else:
objtypedef_cname = None
...
...
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