Changeset 16155 in webkit for trunk/JavaScriptCore/pcre/pcre_exec.c
- Timestamp:
- Aug 31, 2006, 2:28:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/pcre/pcre_exec.c
r15455 r16155 591 591 592 592 DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3)); 593 md->offset_vector[md->offset_end - number] = eptr - md->start_subject;593 md->offset_vector[md->offset_end - number] = INT_CAST(eptr - md->start_subject); 594 594 595 595 do … … 810 810 cb.offset_vector = md->offset_vector; 811 811 cb.subject = (const pcre_char *)md->start_subject; 812 cb.subject_length = md->end_subject - md->start_subject;813 cb.start_match = md->start_match - md->start_subject;814 cb.current_position = eptr - md->start_subject;812 cb.subject_length = INT_CAST(md->end_subject - md->start_subject); 813 cb.start_match = INT_CAST(md->start_match - md->start_subject); 814 cb.current_position = INT_CAST(eptr - md->start_subject); 815 815 cb.pattern_position = GET(ecode, 2); 816 816 cb.next_item_length = GET(ecode, 2 + LINK_SIZE); … … 1077 1077 md->offset_vector[offset] = 1078 1078 md->offset_vector[md->offset_end - number]; 1079 md->offset_vector[offset+1] = eptr - md->start_subject;1079 md->offset_vector[offset+1] = INT_CAST(eptr - md->start_subject); 1080 1080 if (offset_top <= offset) offset_top = offset + 2; 1081 1081 } … … 1419 1419 case OP_REF: 1420 1420 { 1421 int tmplen; 1421 1422 offset = GET2(ecode, 1) << 1; /* Doubled ref number */ 1422 1423 ecode += 3; /* Advance past item */ … … 1427 1428 minima. */ 1428 1429 1430 tmplen = INT_CAST(md->end_subject - eptr + 1); 1429 1431 length = (offset >= offset_top || md->offset_vector[offset] < 0)? 1430 md->end_subject - eptr + 1:1432 tmplen : 1431 1433 md->offset_vector[offset+1] - md->offset_vector[offset]; 1432 1434 … … 3070 3072 { 3071 3073 c = max - min; 3072 if (c > md->end_subject - eptr) c = md->end_subject - eptr;3074 if (c > md->end_subject - eptr) c = INT_CAST(md->end_subject - eptr); 3073 3075 eptr += c; 3074 3076 } … … 3080 3082 case OP_ANYBYTE: 3081 3083 c = max - min; 3082 if (c > md->end_subject - eptr) c = md->end_subject - eptr;3084 if (c > md->end_subject - eptr) c = INT_CAST(md->end_subject - eptr); 3083 3085 eptr += c; 3084 3086 break; … … 3185 3187 case OP_ANYBYTE: 3186 3188 c = max - min; 3187 if (c > md->end_subject - eptr) c = md->end_subject - eptr;3189 if (c > md->end_subject - eptr) c = INT_CAST(md->end_subject - eptr); 3188 3190 eptr += c; 3189 3191 break; … … 3414 3416 if (extra_data != NULL) 3415 3417 { 3416 register unsigned intflags = extra_data->flags;3418 register unsigned long flags = extra_data->flags; 3417 3419 if ((flags & PCRE_EXTRA_STUDY_DATA) != 0) 3418 3420 study = (const pcre_study_data *)extra_data->study_data; … … 3773 3775 if (offsetcount < 2) rc = 0; else 3774 3776 { 3775 offsets[0] = start_match - match_block.start_subject;3776 offsets[1] = match_block.end_match_ptr - match_block.start_subject;3777 offsets[0] = INT_CAST(start_match - match_block.start_subject); 3778 offsets[1] = INT_CAST(match_block.end_match_ptr - match_block.start_subject); 3777 3779 } 3778 3780
Note:
See TracChangeset
for help on using the changeset viewer.