mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add some lua library
This commit is contained in:
20
lua-protobuf/varint.h
Normal file
20
lua-protobuf/varint.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef PROTOBUF_C_VARINT_H
|
||||
#define PROTOBUF_C_VARINT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct longlong {
|
||||
uint32_t low;
|
||||
uint32_t hi;
|
||||
};
|
||||
|
||||
int _pbcV_encode32(uint32_t number, uint8_t buffer[10]);
|
||||
int _pbcV_encode(uint64_t number, uint8_t buffer[10]);
|
||||
int _pbcV_zigzag32(int32_t number, uint8_t buffer[10]);
|
||||
int _pbcV_zigzag(int64_t number, uint8_t buffer[10]);
|
||||
|
||||
int _pbcV_decode(uint8_t buffer[10], struct longlong *result);
|
||||
void _pbcV_dezigzag64(struct longlong *r);
|
||||
void _pbcV_dezigzag32(struct longlong *r);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user