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
19ecd0df
Commit
19ecd0df
authored
Nov 29, 2007
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant marking code
parent
08a9b939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+5
-3
No files found.
Cython/Compiler/Code.py
View file @
19ecd0df
...
...
@@ -34,6 +34,7 @@ class CCodeWriter:
self
.
level
=
0
self
.
bol
=
1
self
.
marker
=
None
self
.
last_marker
=
1
self
.
label_counter
=
1
self
.
error_label
=
None
self
.
filename_table
=
{}
...
...
@@ -53,6 +54,7 @@ class CCodeWriter:
self
.
f
.
write
(
"
\
n
"
);
self
.
indent
()
self
.
f
.
write
(
"/* %s */
\
n
"
%
self
.
marker
)
self
.
last_marker
=
self
.
marker
self
.
marker
=
None
def
put
(
self
,
code
):
...
...
@@ -96,8 +98,6 @@ class CCodeWriter:
return
"0x%02X%02X%02X%02X"
%
(
tuple
(
pyversion
)
+
(
0
,
0
,
0
,
0
))[:
4
]
def
mark_pos
(
self
,
pos
):
# if self.marker is not None:
# print "new marker"
file
,
line
,
col
=
pos
contents
=
self
.
file_contents
(
file
)
...
...
@@ -108,7 +108,9 @@ class CCodeWriter:
s
=
s
.
rstrip
()
+
' # <<<<<<<<<<<<<< '
+
'
\
n
'
context
+=
" * "
+
s
self
.
marker
=
'"%s":%s
\
n
%s'
%
(
file
,
line
,
context
)
marker
=
'"%s":%s
\
n
%s'
%
(
file
,
line
,
context
)
if
self
.
last_marker
!=
marker
:
self
.
marker
=
marker
def
init_labels
(
self
):
self
.
label_counter
=
0
...
...
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