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
c4043e82
Commit
c4043e82
authored
Sep 18, 2007
by
tom@tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partial code for execution in classes
parent
a1e80790
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+0
-2
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
No files found.
Cython/Compiler/Nodes.py
View file @
c4043e82
...
...
@@ -1370,8 +1370,9 @@ class CClassDefNode(StatNode):
env
.
allocate_vtable_names
(
self
.
entry
)
def
analyse_expressions
(
self
,
env
):
scope
=
self
.
entry
.
type
.
scope
if
self
.
body
:
self
.
body
.
analyse_expressions
(
env
)
self
.
body
.
analyse_expressions
(
scope
)
def
generate_function_definitions
(
self
,
env
,
code
):
if
self
.
body
:
...
...
Cython/Compiler/Parsing.py
View file @
c4043e82
...
...
@@ -1227,8 +1227,6 @@ def p_statement(s, level, cdef_flag = 0, visibility = 'private'):
if
level
in
(
'c_class'
,
'c_class_pxd'
):
if
s
.
sy
==
'pass'
:
return
p_pass_statement
(
s
,
with_newline
=
1
)
else
:
s
.
error
(
"Executable statement not allowed here"
)
if
s
.
sy
==
'if'
:
return
p_if_statement
(
s
)
elif
s
.
sy
==
'while'
:
...
...
Cython/Compiler/Symtab.py
View file @
c4043e82
...
...
@@ -1088,7 +1088,7 @@ class CClassScope(ClassScope):
if
name
in
(
'__eq__'
,
'__ne__'
,
'__lt__'
,
'__gt__'
,
'__le__'
,
'__ge__'
):
error
(
pos
,
"Special method %s must be implemented via __richcmp__"
%
name
)
entry
=
self
.
declare
(
name
,
name
,
py_object_type
,
pos
)
entry
=
self
.
declare
_var
(
name
,
py_object_type
,
pos
)
special_sig
=
get_special_method_signature
(
name
)
if
special_sig
:
# Special methods get put in the method table with a particular
...
...
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