Exemplo n.º 1
0
Arquivo: pbc.cpp Projeto: EFLql/conet
int  pb_skip_field(pb_field_t *f, pb_wire_type_t wire_type)
{
    switch (wire_type)
    {
        case PB_WT_VARINT: return pb_skip_varint(f);
        case PB_WT_FIXED64: return pb_get_ddword(f, NULL);
        case PB_WT_STRING: return pb_skip_string(f);
        case PB_WT_FIXED32: return pb_get_dword(f, NULL);
        default: PB_RETURN_ERROR(f, -1, "invalid wire_type");
    }
}
Exemplo n.º 2
0
bool checkreturn pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type)
{
    switch (wire_type)
    {
        case PB_WT_VARINT: return pb_skip_varint(stream);
        case PB_WT_64BIT: return pb_read(stream, NULL, 8);
        case PB_WT_STRING: return pb_skip_string(stream);
        case PB_WT_32BIT: return pb_read(stream, NULL, 4);
        default: PB_RETURN_ERROR(stream, "invalid wire_type");
    }
}