@ -193,7 +193,7 @@ class Parser : public AsyncWrap {
if ( num_fields_ = = num_values_ ) {
// start of new field name
num_fields_ + + ;
if ( num_fields_ = = static_cast < int > ( arraysize ( fields_ ) ) ) {
if ( num_fields_ = = arraysize ( fields_ ) ) {
// ran out of space - flush to javascript land
Flush ( ) ;
num_fields_ = 1 ;
@ -202,7 +202,7 @@ class Parser : public AsyncWrap {
fields_ [ num_fields_ - 1 ] . Reset ( ) ;
}
CHECK_LT ( num_fields_ , static_cast < int > ( arraysize ( fields_ ) ) ) ;
CHECK_LT ( num_fields_ , arraysize ( fields_ ) ) ;
CHECK_EQ ( num_fields_ , num_values_ + 1 ) ;
fields_ [ num_fields_ - 1 ] . Update ( at , length ) ;
@ -218,7 +218,7 @@ class Parser : public AsyncWrap {
values_ [ num_values_ - 1 ] . Reset ( ) ;
}
CHECK_LT ( num_values_ , static_cast < int > ( arraysize ( values_ ) ) ) ;
CHECK_LT ( num_values_ , arraysize ( values_ ) ) ;
CHECK_EQ ( num_values_ , num_fields_ ) ;
values_ [ num_values_ - 1 ] . Update ( at , length ) ;
@ -385,11 +385,11 @@ class Parser : public AsyncWrap {
url_ . Save ( ) ;
status_message_ . Save ( ) ;
for ( in t i = 0 ; i < num_fields_ ; i + + ) {
for ( size_ t i = 0 ; i < num_fields_ ; i + + ) {
fields_ [ i ] . Save ( ) ;
}
for ( in t i = 0 ; i < num_values_ ; i + + ) {
for ( size_ t i = 0 ; i < num_values_ ; i + + ) {
values_ [ i ] . Save ( ) ;
}
}
@ -637,12 +637,10 @@ class Parser : public AsyncWrap {
}
Local < Array > CreateHeaders ( ) {
// num_values_ is either -1 or the entry # of the last header
// so num_values_ == 0 means there's a single header
Local < Array > headers = Array : : New ( env ( ) - > isolate ( ) ) ;
Local < Function > fn = env ( ) - > push_values_to_array_function ( ) ;
Local < Value > argv [ NODE_PUSH_VAL_TO_ARRAY_MAX * 2 ] ;
in t i = 0 ;
size_ t i = 0 ;
do {
size_t j = 0 ;
@ -702,8 +700,8 @@ class Parser : public AsyncWrap {
StringPtr values_ [ 32 ] ; // header values
StringPtr url_ ;
StringPtr status_message_ ;
in t num_fields_ ;
in t num_values_ ;
size_ t num_fields_ ;
size_ t num_values_ ;
bool have_flushed_ ;
bool got_exception_ ;
Local < Object > current_buffer_ ;