THRIFT-361. Use separate negative id counters for arguments and exceptions
authorDavid Reiss <dreiss@apache.org>
Thu, 19 Mar 2009 08:14:12 +0000 (08:14 +0000)
committerDavid Reiss <dreiss@apache.org>
Thu, 19 Mar 2009 08:14:12 +0000 (08:14 +0000)
NOTE:
This will break wire-compatibility, but only with functions that have
both negative-id arguments and negative id-exceptions, and only in the
exceptional case.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@755870 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/thrifty.yy

index b71fd7e..381b434 100644 (file)
@@ -677,7 +677,6 @@ Struct:
         $$->annotations_ = $7->annotations_;
         delete $7;
       }
-      y_field_val = -1;
     }
 
 XsdAll:
@@ -727,7 +726,6 @@ Xception:
       $4->set_name($2);
       $4->set_xception(true);
       $$ = $4;
-      y_field_val = -1;
     }
 
 Service:
@@ -788,7 +786,6 @@ Function:
       if ($1 != NULL) {
         $$->set_doc($1);
       }
-      y_field_val = -1;
     }
 
 Async:
@@ -830,6 +827,7 @@ FieldList:
 |
     {
       pdebug("FieldList -> ");
+      y_field_val = -1;
       $$ = new t_struct(g_program);
     }