New submission from Serhiy Storchaka:

A set of macros to work with surrogates was introduced in 3.3: 
Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, 
Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES, 
Py_UNICODE_HIGH_SURROGATE, and Py_UNICODE_LOW_SURROGATE.  Using this macros 
makes a code more readable, protect from errors, and allows use the one most 
effective implementation.  But not all surrogate-related code uses this macros. 
 I suppose this is done inadvertently, somewhere the macro and naked code used 
in neighboring lines.

The proposed patch replaces a naked surrogate code to macros in all places 
except expat (which is a foreign code).

----------
components: Interpreter Core, Unicode
files: use_surrogate_macros.patch
keywords: patch
messages: 173855
nosy: ezio.melotti, haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use surrogate-related macros
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27730/use_surrogate_macros.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16330>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to