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
Kirill Smelkov
cython
Commits
b47fb4d0
Commit
b47fb4d0
authored
Dec 09, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up some code
parent
018d6c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+3
-8
No files found.
Cython/Compiler/Symtab.py
View file @
b47fb4d0
...
...
@@ -15,9 +15,6 @@ from TypeSlots import \
import
Code
import
__builtin__
as
builtins
possible_identifier
=
re
.
compile
(
ur"(?![0-9])\
w+$
", re.U).match
nice_identifier = re.compile('^[a-zA-Z0-0_]+$').match
iso_c99_keywords
=
set
(
[
'auto'
,
'break'
,
'case'
,
'char'
,
'const'
,
'continue'
,
'default'
,
'do'
,
'double'
,
'else'
,
'enum'
,
'extern'
,
'float'
,
'for'
,
'goto'
,
'if'
,
...
...
@@ -1114,8 +1111,6 @@ class ModuleScope(Scope):
# name to appear again, and indeed the generated
# code compiles fine.
return
entry
warning(pos, "'%s'
redeclared
" % name, 0)
return None
else
:
entry
=
self
.
declare_var
(
name
,
py_object_type
,
pos
)
entry
.
as_module
=
scope
...
...
@@ -1140,7 +1135,7 @@ class ModuleScope(Scope):
if
not
cname
:
defining
=
not
in_pxd
if
(visibility == 'extern' or (visibility == 'public' and defining)
):
if
visibility
==
'extern'
or
(
visibility
==
'public'
and
defining
):
cname
=
name
else
:
cname
=
self
.
mangle
(
Naming
.
var_prefix
,
name
)
...
...
@@ -1183,7 +1178,7 @@ class ModuleScope(Scope):
defining
=
0
,
modifiers
=
(),
utility_code
=
None
):
# Add an entry for a C function.
if
not
cname
:
if
(visibility == 'extern' or (visibility == 'public' and defining)
):
if
visibility
==
'extern'
or
(
visibility
==
'public'
and
defining
):
cname
=
name
else
:
cname
=
self
.
mangle
(
Naming
.
func_prefix
,
name
)
...
...
@@ -2090,7 +2085,7 @@ class CppClassScope(Scope):
continue
#print base_entry.name, self.entries
if
base_entry
.
name
in
self
.
entries
:
base_entry
.
name
base_entry
.
name
# FIXME: is there anything to do in this case?
entry
=
self
.
declare
(
base_entry
.
name
,
base_entry
.
cname
,
base_entry
.
type
,
None
,
'extern'
)
entry
.
is_variable
=
1
...
...
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