From e500b59b585101d4de1b4b80cfd193d6ed4c0aef Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Fri, 15 Aug 2008 20:47:05 +0200 Subject: [PATCH] Buffers: Unicode dict key problem --- Cython/Compiler/Buffer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2