# New Ticket Created by  Roger Browne 
# Please include the string:  [perl #37386]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37386 >


In file include/parrot/cclass.h, the values of enum_cclass_any and
enum_cclass_none appear to be the wrong way around. This code:

.include 'cclass.pasm'
.sub main
  .local int match
  match = is_cclass .CCLASS_ANY, 'a', 0
  print match
  match = is_cclass .CCLASS_NONE, 'a', 0
  print match
  print "\n"
.end

prints "01" in revision 9407, but presumably it should print "10" (which
it does after the attached patch is applied).

Regards,
Roger Browne
Index: include/parrot/cclass.h
===================================================================
--- include/parrot/cclass.h	(revision 9407)
+++ include/parrot/cclass.h	(working copy)
@@ -10,8 +10,8 @@
 
 /* &gen_from_enum(cclass.pasm) subst(s/enum_cclass_(\w+)/uc("CCLASS_$1")/e) */
 typedef enum {				/* ASCII characters matching this class: */
-enum_cclass_any = 0x0000,		/* all */
-enum_cclass_none = 0xffff,		/* none */
+enum_cclass_none = 0x0000,		/* none */
+enum_cclass_any = 0xffff,		/* all */
 enum_cclass_uppercase = 0x0001,		/* A-Z */
 enum_cclass_lowercase = 0x0002,		/* a-z */
 enum_cclass_alphabetic = 0x0004,	/* a-z, A-Z */

Reply via email to