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
d1e3aee9
Commit
d1e3aee9
authored
Feb 12, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanups in Code.py
parent
a83b832c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+4
-1
No files found.
Cython/Compiler/Code.py
View file @
d1e3aee9
...
...
@@ -55,12 +55,14 @@ modifier_output_mapper = {
'inline'
:
'CYTHON_INLINE'
}.
get
def
get_utility_dir
():
# make this a function and not global variables:
# http://trac.cython.org/cython_trac/ticket/475
Cython_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
return
os
.
path
.
join
(
Cython_dir
,
"Utility"
)
class
UtilityCodeBase
(
object
):
"""
Support for loading utility code from a file.
...
...
@@ -144,7 +146,7 @@ class UtilityCodeBase(object):
replace_comments = re.compile(r'
^
\
s
*//
.
*|^
\
s
*/
\
*
[
^*
]
*
\
*/
').sub
match_special = re.compile(
(r'
^%
(
C
)
s
{
5
,
30
}
\
s
*
(
?
P
<
name
>
(
?
:
\
w
|
\
.)
+
)
\
s
*%
(
C
)
s
{
5
,
30
}
|
'
r'
^%
(
C
)
s
+@
(
?
P
<
tag
>
\
w
+
)
\
s
*
:
\
s
*
(
?
P
<
value
>
(
?
:
\
w
|
[.:])
+
)
'
# add more tag names here at need
r'
^%
(
C
)
s
+@
(
?
P
<
tag
>
\
w
+
)
\
s
*
:
\
s
*
(
?
P
<
value
>
(
?
:
\
w
|
[.:])
+
)
'
) % {'
C
':comment}).match
match_type = re.compile('
(.
+
)[.](
proto
|
impl
|
init
|
cleanup
)
$
').match
...
...
@@ -293,6 +295,7 @@ class UtilityCodeBase(object):
def
get_tree
(
self
):
pass
class
UtilityCode
(
UtilityCodeBase
):
"""
Stores utility code to add during code generation.
...
...
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