[Zope-CVS] SVN: zope.ucol/trunk/src/zope/ucol/_zope_ucol. Updated computation of used_default_information to use a different

Jim Fulton jim at zope.com
Wed Jan 4 17:10:08 EST 2006


Log message for revision 41140:
  Updated computation of used_default_information to use a different
  warning constant, which seems to be used in newer versions of ICU.
  

Changed:
  U   zope.ucol/trunk/src/zope/ucol/_zope_ucol.c
  U   zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx

-=-
Modified: zope.ucol/trunk/src/zope/ucol/_zope_ucol.c
===================================================================
--- zope.ucol/trunk/src/zope/ucol/_zope_ucol.c	2006-01-04 19:42:46 UTC (rev 41139)
+++ zope.ucol/trunk/src/zope/ucol/_zope_ucol.c	2006-01-04 22:10:07 UTC (rev 41140)
@@ -1,4 +1,4 @@
-/* Generated by Pyrex 0.9.3.1 on Fri Dec  9 16:03:01 2005 */
+/* Generated by Pyrex 0.9.3 on Wed Jan  4 17:07:13 2006 */
 
 #include "Python.h"
 #include "structmember.h"
@@ -85,128 +85,128 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_text);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":86 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":87 */
   __pyx_1 = (!PyUnicode_Check(__pyx_v_text));
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":87 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":88 */
     __pyx_1 = PyString_Check(__pyx_v_text);
     if (__pyx_1) {
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":88 */
-      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_unicode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
-      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":89 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_unicode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
       Py_INCREF(__pyx_v_text);
       PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_text);
-      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
+      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
       Py_DECREF(__pyx_2); __pyx_2 = 0;
       Py_DECREF(__pyx_3); __pyx_3 = 0;
       Py_DECREF(__pyx_v_text);
       __pyx_v_text = __pyx_4;
       __pyx_4 = 0;
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":89 */
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":90 */
       if (!PyUnicode_Check(__pyx_v_text)) {
         PyErr_SetNone(PyExc_AssertionError);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
       }
       goto __pyx_L3;
     }
     /*else*/ {
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":91 */
-      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
-      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":92 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
       Py_INCREF(__pyx_k2p);
       PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k2p);
-      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
+      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
       Py_DECREF(__pyx_2); __pyx_2 = 0;
       Py_DECREF(__pyx_3); __pyx_3 = 0;
       __Pyx_Raise(__pyx_4, 0, 0);
       Py_DECREF(__pyx_4); __pyx_4 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
     }
     __pyx_L3:;
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":93 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":94 */
   __pyx_v_length = PyUnicode_GET_SIZE(__pyx_v_text);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":94 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":95 */
   __pyx_v_str = PyUnicode_AS_UNICODE(__pyx_v_text);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":97 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":98 */
   __pyx_1 = ((sizeof(Py_UNICODE )) == 2);
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":98 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":99 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data = __pyx_v_str;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":99 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":100 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->length = __pyx_v_length;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":100 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":101 */
     Py_INCREF(__pyx_v_text);
     Py_DECREF(((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->base);
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->base = __pyx_v_text;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":101 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":102 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->need_to_free = 0;
     goto __pyx_L4;
   }
   /*else*/ {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":103 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":104 */
     __pyx_v_buffsize = ((2 * __pyx_v_length) + 1);
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":104 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":105 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data = ((UChar (*))PyMem_Malloc((__pyx_v_buffsize * (sizeof(UChar )))));
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":105 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":106 */
     __pyx_1 = (((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data == 0);
     if (__pyx_1) {
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":106 */
-      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":107 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
       __Pyx_Raise(__pyx_2, 0, 0);
       Py_DECREF(__pyx_2); __pyx_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":107 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":108 */
     __pyx_v_status = 0;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":108 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":109 */
     u_strFromUTF32(((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data,__pyx_v_buffsize,(&((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->length),((UChar32 (*))__pyx_v_str),__pyx_v_length,(&__pyx_v_status));
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":110 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":111 */
     if (!(((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->length <= __pyx_v_buffsize)) {
       PyErr_SetNone(PyExc_AssertionError);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;}
     }
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":111 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":112 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->need_to_free = 1;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":112 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":113 */
     __pyx_1 = U_FAILURE(__pyx_v_status);
     if (__pyx_1) {
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":113 */
-      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
-      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":114 */
+      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
+      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
       Py_INCREF(__pyx_k3p);
       PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k3p);
-      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
       Py_DECREF(__pyx_3); __pyx_3 = 0;
       Py_DECREF(__pyx_4); __pyx_4 = 0;
       __Pyx_Raise(__pyx_2, 0, 0);
       Py_DECREF(__pyx_2); __pyx_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; goto __pyx_L1;}
       goto __pyx_L6;
     }
     __pyx_L6:;
@@ -232,17 +232,17 @@
   int __pyx_1;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":118 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":119 */
   __pyx_1 = ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->need_to_free;
   if (__pyx_1) {
     __pyx_1 = (((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data != 0);
   }
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":119 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":120 */
     PyMem_Free(((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data);
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":120 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":121 */
     ((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_self)->data = 0;
     goto __pyx_L2;
   }
@@ -275,69 +275,72 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_locale);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":135 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":136 */
   __pyx_1 = (!PyString_Check(__pyx_v_locale));
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":136 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":137 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_TypeError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
     Py_INCREF(__pyx_k4p);
     PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k4p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":138 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":139 */
   __pyx_v_status = U_ZERO_ERROR;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":139 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":140 */
   __pyx_v_collator = ucol_open(PyString_AS_STRING(__pyx_v_locale),(&__pyx_v_status));
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":140 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":141 */
   __pyx_1 = U_FAILURE(__pyx_v_status);
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":141 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":142 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
     Py_INCREF(__pyx_k5p);
     PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k5p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; goto __pyx_L1;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":142 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":143 */
   ((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator = __pyx_v_collator;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":143 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":144 */
   Py_INCREF(__pyx_v_locale);
   Py_DECREF(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->locale);
   ((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->locale = __pyx_v_locale;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":144 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":145 */
   __pyx_1 = (__pyx_v_status == U_USING_DEFAULT_WARNING);
+  if (!__pyx_1) {
+    __pyx_1 = (__pyx_v_status == U_USING_FALLBACK_WARNING);
+  }
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":145 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":148 */
     __pyx_v_status = 1;
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":146 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":149 */
   ((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->used_default_information = __pyx_v_status;
 
   __pyx_r = 0;
@@ -359,11 +362,11 @@
   int __pyx_1;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":149 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":152 */
   __pyx_1 = (((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator != 0);
   if (__pyx_1) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":150 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":153 */
     ucol_close(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator);
     goto __pyx_L2;
   }
@@ -395,79 +398,79 @@
   __pyx_v_icutext = Py_None; Py_INCREF(__pyx_v_icutext);
   __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":161 */
-  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; goto __pyx_L1;}
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":164 */
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
   Py_INCREF(__pyx_v_text);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_text);
-  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_v_icutext);
   __pyx_v_icutext = __pyx_2;
   __pyx_2 = 0;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":162 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":165 */
   __pyx_v_bufsize = ((((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_icutext)->length * 2) + 10);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":165 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":168 */
   __pyx_v_buffer = ((char (*))PyMem_Malloc((__pyx_v_bufsize + 1)));
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":166 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":169 */
   __pyx_3 = (__pyx_v_buffer == 0);
   if (__pyx_3) {
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":167 */
-    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;}
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":170 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
     __Pyx_Raise(__pyx_1, 0, 0);
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":168 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":171 */
   __pyx_v_size = ucol_getSortKey(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_icutext)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_icutext)->length,((uint8_t (*))__pyx_v_buffer),__pyx_v_bufsize);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":172 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":175 */
   while (1) {
     __pyx_3 = (__pyx_v_size > __pyx_v_bufsize);
     if (!__pyx_3) break;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":173 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":176 */
     __pyx_v_bufsize = __pyx_v_size;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":174 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":177 */
     PyMem_Free(__pyx_v_buffer);
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":175 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":178 */
     __pyx_v_buffer = ((char (*))PyMem_Malloc((__pyx_v_bufsize + 1)));
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":176 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":179 */
     __pyx_3 = (__pyx_v_buffer == 0);
     if (__pyx_3) {
 
-      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":177 */
-      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
+      /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":180 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_MemoryError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
       __Pyx_Raise(__pyx_2, 0, 0);
       Py_DECREF(__pyx_2); __pyx_2 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
       goto __pyx_L5;
     }
     __pyx_L5:;
 
-    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":178 */
+    /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":181 */
     __pyx_v_size = ucol_getSortKey(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_icutext)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_icutext)->length,((uint8_t (*))__pyx_v_buffer),__pyx_v_bufsize);
   }
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":183 */
-  __pyx_1 = PyString_FromStringAndSize(__pyx_v_buffer,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; goto __pyx_L1;}
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":186 */
+  __pyx_1 = PyString_FromStringAndSize(__pyx_v_buffer,__pyx_v_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; goto __pyx_L1;}
   Py_DECREF(__pyx_v_result);
   __pyx_v_result = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":184 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":187 */
   PyMem_Free(__pyx_v_buffer);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":185 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":188 */
   Py_INCREF(__pyx_v_result);
   __pyx_r = __pyx_v_result;
   goto __pyx_L0;
@@ -504,28 +507,28 @@
   __pyx_v_u1 = Py_None; Py_INCREF(__pyx_v_u1);
   __pyx_v_u2 = Py_None; Py_INCREF(__pyx_v_u2);
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":188 */
-  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":191 */
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;}
   Py_INCREF(__pyx_v_o1);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_o1);
-  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_v_u1);
   __pyx_v_u1 = __pyx_2;
   __pyx_2 = 0;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":189 */
-  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;}
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":192 */
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;}
   Py_INCREF(__pyx_v_o2);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_o2);
-  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_10_zope_ucol_UCharString), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_v_u2);
   __pyx_v_u2 = __pyx_2;
   __pyx_2 = 0;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":190 */
-  __pyx_1 = PyInt_FromLong(ucol_strcoll(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u1)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u1)->length,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u2)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u2)->length)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;}
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":193 */
+  __pyx_1 = PyInt_FromLong(ucol_strcoll(((struct __pyx_obj_10_zope_ucol_Collator *)__pyx_v_self)->collator,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u1)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u1)->length,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u2)->data,((struct __pyx_obj_10_zope_ucol_UCharString *)__pyx_v_u2)->length)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -915,12 +918,12 @@
   if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;};
   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;};
   __pyx_type_10_zope_ucol_UCharString.tp_free = _PyObject_GC_Del;
-  if (PyType_Ready(&__pyx_type_10_zope_ucol_UCharString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "UCharString", (PyObject *)&__pyx_type_10_zope_ucol_UCharString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_10_zope_ucol_UCharString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "UCharString", (PyObject *)&__pyx_type_10_zope_ucol_UCharString) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; goto __pyx_L1;}
   __pyx_ptype_10_zope_ucol_UCharString = &__pyx_type_10_zope_ucol_UCharString;
   __pyx_type_10_zope_ucol_Collator.tp_free = _PyObject_GC_Del;
-  if (PyType_Ready(&__pyx_type_10_zope_ucol_Collator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "Collator", (PyObject *)&__pyx_type_10_zope_ucol_Collator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_10_zope_ucol_Collator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "Collator", (PyObject *)&__pyx_type_10_zope_ucol_Collator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; goto __pyx_L1;}
   __pyx_ptype_10_zope_ucol_Collator = &__pyx_type_10_zope_ucol_Collator;
 
   /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":18 */
@@ -928,7 +931,7 @@
   if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":187 */
+  /* "/home/jim/p/zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx":190 */
   return;
   __pyx_L1:;
   Py_XDECREF(__pyx_1);

Modified: zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx
===================================================================
--- zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx	2006-01-04 19:42:46 UTC (rev 41139)
+++ zope.ucol/trunk/src/zope/ucol/_zope_ucol.pyx	2006-01-04 22:10:07 UTC (rev 41140)
@@ -21,6 +21,7 @@
 
     cdef enum UErrorCode:
         U_USING_DEFAULT_WARNING = -127
+        U_USING_FALLBACK_WARNING = -128
     ctypedef int int32_t
     ctypedef char uint8_t
     int U_FAILURE(UErrorCode status)
@@ -141,7 +142,9 @@
             raise ValueError("Couldn't create a collator")
         self.collator = collator
         self.locale = locale
-        if status == U_USING_DEFAULT_WARNING:
+        if (status == U_USING_DEFAULT_WARNING
+            or
+            status == U_USING_FALLBACK_WARNING):
             status = 1
         self.used_default_information = status
 



More information about the Zope-CVS mailing list