1
0
mirror of https://github.com/fumiama/simple-protobuf.git synced 2026-06-18 00:40:26 +08:00

修正align与items_len

This commit is contained in:
fumiama
2021-05-18 09:14:04 +08:00
parent 234e414be2
commit 6c5f133c33
3 changed files with 30 additions and 33 deletions

View File

@@ -10,8 +10,9 @@ struct SIMPLE_PB {
typedef struct SIMPLE_PB SIMPLE_PB;
SIMPLE_PB* get_pb(FILE* fp);
int set_pb(FILE* fp, uint8_t* items_type, uint64_t struct_len, void* target);
int set_pb(FILE* fp, uint64_t* items_len, uint64_t struct_len, void* target);
uint8_t first_set(uint64_t n);
void align_struct(uint8_t* items_type, uint64_t items_cnt, uint64_t struct_size);
//uint64_t struct_size, uint32_t items_cnt, void* item_addr1, void* item_addr2...
uint64_t* align_struct(uint64_t struct_size, uint32_t items_cnt, ...);
#endif