Commit 871d6787 authored by Robert Edmonds's avatar Robert Edmonds

protobuf-c: remove UNALIGNED_ALLOC, DO_UNALIGNED_ALLOC macros

parent b8c5e06d
...@@ -97,9 +97,6 @@ do { \ ...@@ -97,9 +97,6 @@ do { \
((allocator)->free((allocator)->allocator_data, (ptr)));\ ((allocator)->free((allocator)->allocator_data, (ptr)));\
} while (0) } while (0)
#define UNALIGNED_ALLOC(allocator, size) ALLOC(allocator, size)
#define DO_UNALIGNED_ALLOC DO_ALLOC
#define STRUCT_MEMBER_P(struct_p, struct_offset) \ #define STRUCT_MEMBER_P(struct_p, struct_offset) \
((void *) ((uint8_t *) (struct_p) + (struct_offset))) ((void *) ((uint8_t *) (struct_p) + (struct_offset)))
...@@ -2207,8 +2204,7 @@ parse_member(ScannedMember *scanned_member, ...@@ -2207,8 +2204,7 @@ parse_member(ScannedMember *scanned_member,
ufield->tag = scanned_member->tag; ufield->tag = scanned_member->tag;
ufield->wire_type = scanned_member->wire_type; ufield->wire_type = scanned_member->wire_type;
ufield->len = scanned_member->len; ufield->len = scanned_member->len;
DO_UNALIGNED_ALLOC(ufield->data, allocator, DO_ALLOC(ufield->data, allocator, scanned_member->len, return 0);
scanned_member->len, return 0);
memcpy(ufield->data, scanned_member->data, ufield->len); memcpy(ufield->data, scanned_member->data, ufield->len);
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment