/* * upb - a minimalist implementation of protocol buffers. * * Copyright (c) 2009 Joshua Haberman. See LICENSE for details. * */ #include #include #include "upb.h" #define alignof(t) offsetof(struct { char c; t x; }, x) #define TYPE_INFO(proto_type, wire_type, ctype) \ [GOOGLE_PROTOBUF_FIELDDESCRIPTORPROTO_TYPE_ ## proto_type] = \ {alignof(ctype), sizeof(ctype), wire_type, #ctype}, // With packed fields, any type expecting 32-bit, 64-bit or varint can instead // receive delimited. upb_type_info upb_types[] = { TYPE_INFO(DOUBLE, (1<code = code; va_list args; va_start(args, msg); vsnprintf(status->msg, UPB_ERRORMSG_MAXLEN, msg, args); va_end(args); } }