On 6/10/07, martin.v.loewis <[email protected]> wrote:
> Author: martin.v.loewis
> Date: Sun Jun 10 11:51:05 2007
> New Revision: 55850
>
> Modified: python/branches/py3k-struni/Modules/unicodedata.c
> ==============================================================================
> --- python/branches/py3k-struni/Modules/unicodedata.c   (original)
> +++ python/branches/py3k-struni/Modules/unicodedata.c   Sun Jun 10 11:51:05 
> 2007
> @@ -515,7 +515,7 @@
>              /* Hangul Decomposition adds three characters in
>                 a single step, so we need atleast that much room. */
>              if (space < 3) {
> -                Py_ssize_t newsize = PyString_GET_SIZE(result) + 10;
> +                Py_ssize_t newsize = PyUnicode_GET_SIZE(result) + 10;
>                  space += 10;
>                  if (PyUnicode_Resize(&result, newsize) == -1)
>                      return NULL;

Martin,

Is it a problem to add a constant value (10 in this case) to the new
unicode object?  Does the size of unicode (UCS-2 vs 4) matter?  Does
it matter if there are unicode escapes U+000...?

Even if it doesn't matter in this specific example what are the cases
where it does matter?  (I'm remembering the block of code where we
didn't allocate enough for U+000.... for ucs-4.)

Thanks,
n
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to