From: Dag Sverre Seljebotn Date: Fri, 15 Aug 2008 18:47:05 +0000 (+0200) Subject: Buffers: Unicode dict key problem X-Git-Tag: 0.9.8.1~33 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e500b59b585101d4de1b4b80cfd193d6ed4c0aef;p=cython.git Buffers: Unicode dict key problem --- diff --git a/Cython/Compiler/Buffer.py b/Cython/Compiler/Buffer.py index 477f80ac..c71a0a2c 100644 --- a/Cython/Compiler/Buffer.py +++ b/Cython/Compiler/Buffer.py @@ -144,7 +144,8 @@ def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, nee raise CompileError(posargs[-1][1], ERR_BUF_TOO_MANY) options = {} - for name, (value, pos) in dictargs.iteritems(): + for unicode_name, (value, pos) in dictargs.iteritems(): + name = str(unicode_name) if not name in buffer_options: raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) options[name] = value