[Python-checkins] CVS: python/dist/src/Objects unicodectype.c,2.3,2.4

Jack Jansen python-dev@python.org
Thu, 6 Jul 2000 06:57:42 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17257

Modified Files:
	unicodectype.c 
Log Message:
Conditionally (currently on ifdef macintosh) break the large switch up 
into 1000-case smaller ones.


Index: unicodectype.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodectype.c,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** unicodectype.c	2000/07/05 09:48:59	2.3
--- unicodectype.c	2000/07/06 13:57:38	2.4
***************
*** 15,18 ****
--- 15,28 ----
  #include "unicodeobject.h"
  
+ #ifdef macintosh
+ /* This probably needs to be defined for some other compilers too. It breaks the
+ ** 5000-label switch statement up into switches with around 1000 cases each.
+ */
+ #define BREAK_SWITCH_UP	return 1; } switch (ch) {
+ #else
+ #define BREAK_SWITCH_UP /* nothing */
+ #endif
+ 
+ 
  /* Returns 1 for Unicode characters having the category 'Zl' or type
     'B', 0 otherwise. */
***************
*** 5992,5995 ****
--- 6002,6006 ----
      case 0x1023: /* MYANMAR LETTER I */
      case 0x1024: /* MYANMAR LETTER II */
+ BREAK_SWITCH_UP
      case 0x1025: /* MYANMAR LETTER U */
      case 0x1026: /* MYANMAR LETTER UU */
***************
*** 6991,6994 ****
--- 7002,7006 ----
      case 0x1532: /* CANADIAN SYLLABICS WEST-CREE YWI */
      case 0x1533: /* CANADIAN SYLLABICS YWII */
+ BREAK_SWITCH_UP
      case 0x1534: /* CANADIAN SYLLABICS WEST-CREE YWII */
      case 0x1535: /* CANADIAN SYLLABICS YWO */
***************
*** 7990,7993 ****
--- 8002,8006 ----
      case 0xA02A: /* YI SYLLABLE BE */
      case 0xA02B: /* YI SYLLABLE BEP */
+ BREAK_SWITCH_UP
      case 0xA02C: /* YI SYLLABLE BUT */
      case 0xA02D: /* YI SYLLABLE BUX */
***************
*** 8989,8992 ****
--- 9002,9006 ----
      case 0xA411: /* YI SYLLABLE QUR */
      case 0xA412: /* YI SYLLABLE QYT */
+ BREAK_SWITCH_UP
      case 0xA413: /* YI SYLLABLE QYX */
      case 0xA414: /* YI SYLLABLE QY */
***************
*** 9988,9991 ****
--- 10002,10006 ----
      case 0xFD94: /* ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM */
      case 0xFD95: /* ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM */
+ BREAK_SWITCH_UP
      case 0xFD96: /* ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM */
      case 0xFD97: /* ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM */