You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
231 B
C

#include "scan.h"
size_t scan_pb_tag(const char* in,size_t len, size_t* fieldno,unsigned char* type) {
unsigned long long l;
size_t n=scan_varint(in,len,&l);
if (n==0) return 0;
*type=l&7;
*fieldno=(l>>3);
return n;
}