On Thu, 10 Apr 2008 10:53:31 -0700
[EMAIL PROTECTED] (via RT)
<[EMAIL PROTECTED]> wrote:

> # New Ticket Created by  [EMAIL PROTECTED] 
> # Please include the string:  [perl #52710]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52710 >
> 
> 
> Hey,
> 
> I *thought* I'd try and clean up an easy one, so I took
> src/key.c
> src/key.c: In function `key_integer':
> src/key.c:368: warning: switch missing default case
> 
> After a little poking I tracked the rest of the Key_xxxx_FLAG s down
> to include/parrot/key.h (and pobj.h) [1] and so I rearrainged the
> case stmt to cover them all (noting the TODO on slices, I separated
> those), putting in the current default behavior for everything that
> wasn't already covered and then adding a default branch w/ an
> exception (taken from the next sub ... ). This broke iterator.t tests
> and it appears to be due to a missing (?) flag value of '8' for
> switch test switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
> 
> So ... either there's a missing KEY_xxxx_FLAG or something. One hint
> is in src/packdump.c [3] which would say the '8' is an 'is_string'
> flag?  I've not yet been able to track backwards (my debugging is
> painfully slow w/ printf's and re-makes) to see who's calling w/ the
> funny flag value but  I thought I'd ask here to see if anybody had an
> answer.
> 
> Thanks.

Hi,

Here's the code you posted in [2], in unified diff format, without the
C++-style comments and white space changes.  It looks like your mail
client screwed up the white space, which made it pretty hard to
see what was changed... please read docs/submissions.pod when you have a
chance, the tips contained within make this kind of thing a lot easier.

Thanks!

Mark
Index: src/key.c
===================================================================
--- src/key.c   (revision 26901)
+++ src/key.c   (working copy)
@@ -322,7 +322,18 @@
             return string_to_int(interp, s_reg);
             }
             /* TODO check for slice_FLAGs */
+        case KEY_start_slice_FLAG:
+        case KEY_end_slice_FLAG:
+        case KEY_inf_slice_FLAG:
+            return VTABLE_get_integer(interp, key);
+        case KEY_number_FLAG:
+            return VTABLE_get_integer(interp, key);
+        default:
+            real_exception(interp, NULL, INVALID_OPERATION, 
+                "Key_integer %d %d %d not a valid flag!\n", 
VTABLE_get_integer(interp, 
+                key), PObj_get_FLAGS(key), PObj_get_FLAGS(key) &  
KEY_type_FLAGS);
         }
+
     }
 
     return VTABLE_get_integer(interp, key);

Reply via email to