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
b536de62
Commit
b536de62
authored
Jun 16, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 3 fix.
parent
d4daf977
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+6
-2
No files found.
Cython/Compiler/Code.py
View file @
b536de62
...
...
@@ -9,7 +9,6 @@ cython.declare(os=object, re=object, operator=object,
Utils
=
object
,
SourceDescriptor
=
object
,
StringIOTree
=
object
,
DebugFlags
=
object
,
basestring
=
object
)
from
md5
import
md5
import
os
import
re
import
sys
...
...
@@ -17,6 +16,11 @@ from string import Template
import
operator
import
textwrap
try
:
import
hashlib
except
ImportError
:
import
md5
as
hashlib
import
Naming
import
Options
import
StringEncoding
...
...
@@ -1527,7 +1531,7 @@ class CCodeWriter(object):
def
put_or_include
(
self
,
code
,
name
):
if
code
:
if
self
.
globalstate
.
common_utility_include_dir
and
len
(
code
)
>
1042
:
include_file
=
"%s_%s.h"
%
(
name
,
md5
(
code
).
hexdigest
())
include_file
=
"%s_%s.h"
%
(
name
,
hashlib
.
md5
(
code
).
hexdigest
())
path
=
os
.
path
.
join
(
self
.
globalstate
.
common_utility_include_dir
,
include_file
)
if
not
os
.
path
.
exists
(
path
):
tmp_path
=
'%s.tmp%s'
%
(
path
,
os
.
getpid
())
...
...
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