Lines Matching refs:new_pos
108 decoder returns a (value, new_pos) pair.
161 """Read a tag from the buffer, and return a (tag_bytes, new_pos) tuple.
217 (element, new_pos) = decode_value(buffer, pos)
221 pos = new_pos + tag_len
222 if buffer[new_pos:pos] != tag_bytes or new_pos >= end:
224 if new_pos > end:
226 return new_pos
249 (result, new_pos) = decode_value(buffer, pos)
250 return (modify_value(result), new_pos)
273 new_pos = pos + value_size
274 result = local_unpack(format, buffer[pos:new_pos])[0]
275 return (result, new_pos)
291 new_pos = pos + 4
292 float_bytes = buffer[pos:new_pos]
301 return (_NAN, new_pos)
304 return (_NEG_INF, new_pos)
305 return (_POS_INF, new_pos)
311 return (result, new_pos)
326 new_pos = pos + 8
327 double_bytes = buffer[pos:new_pos]
335 return (_NAN, new_pos)
341 return (result, new_pos)
394 new_pos = pos + size
395 if new_pos > end:
397 value.append(local_unicode(buffer[pos:new_pos], 'utf-8'))
399 pos = new_pos + tag_len
400 if buffer[new_pos:pos] != tag_bytes or new_pos == end:
402 return new_pos
407 new_pos = pos + size
408 if new_pos > end:
410 field_dict[key] = local_unicode(buffer[pos:new_pos], 'utf-8')
411 return new_pos
431 new_pos = pos + size
432 if new_pos > end:
434 value.append(buffer[pos:new_pos])
436 pos = new_pos + tag_len
437 if buffer[new_pos:pos] != tag_bytes or new_pos == end:
439 return new_pos
444 new_pos = pos + size
445 if new_pos > end:
447 field_dict[key] = buffer[pos:new_pos]
448 return new_pos
475 new_pos = pos+end_tag_len
476 if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
479 pos = new_pos + tag_len
480 if buffer[new_pos:pos] != tag_bytes or new_pos == end:
482 return new_pos
492 new_pos = pos+end_tag_len
493 if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
495 return new_pos
519 new_pos = pos + size
520 if new_pos > end:
523 if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
528 pos = new_pos + tag_len
529 if buffer[new_pos:pos] != tag_bytes or new_pos == end:
531 return new_pos
540 new_pos = pos + size
541 if new_pos > end:
544 if value._InternalParse(buffer, pos, new_pos) != new_pos:
548 return new_pos
664 new_pos = SkipField(buffer, pos, end, tag_bytes)
665 if new_pos == -1:
667 pos = new_pos