Commit c2f2e12d authored by Robert Bradshaw's avatar Robert Bradshaw

Fix bug in string literal handling in cython.inlinge

parent 24065537
...@@ -103,6 +103,7 @@ def cython_inline(code, ...@@ -103,6 +103,7 @@ def cython_inline(code,
if get_type is None: if get_type is None:
get_type = lambda x: 'object' get_type = lambda x: 'object'
code = to_unicode(code) code = to_unicode(code)
orig_code = code
code, literals = strip_string_literals(code) code, literals = strip_string_literals(code)
code = strip_common_indent(code) code = strip_common_indent(code)
ctx = Context(cython_include_dirs, default_options) ctx = Context(cython_include_dirs, default_options)
...@@ -127,7 +128,7 @@ def cython_inline(code, ...@@ -127,7 +128,7 @@ def cython_inline(code,
arg_names = kwds.keys() arg_names = kwds.keys()
arg_names.sort() arg_names.sort()
arg_sigs = tuple([(get_type(kwds[arg], ctx), arg) for arg in arg_names]) arg_sigs = tuple([(get_type(kwds[arg], ctx), arg) for arg in arg_names])
key = code, arg_sigs, sys.version_info, sys.executable, Cython.__version__ key = orig_code, arg_sigs, sys.version_info, sys.executable, Cython.__version__
module_name = "_cython_inline_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() module_name = "_cython_inline_" + hashlib.md5(str(key).encode('utf-8')).hexdigest()
try: try:
if not os.path.exists(lib_dir): if not os.path.exists(lib_dir):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment