PelionIoT / mbed-coap

CoAP C library - Builder and Parser for CoAP messages
Apache License 2.0
29 stars 16 forks source link

Optimise packet parser and builder core #117

Closed kjbracey closed 3 years ago

kjbracey commented 4 years ago

[X] I confirm this contribution is my own and I agree to license it with Apache 2.0. [] I confirm the moderators may change the PR before merging it in.

Summary of changes

Simplify packet builder and parser, primarily by eliminating double pointer indirection. Use return values to help with that.

No public API changes - all changes are internal.

Saves around 300 bytes of code size.

kjbracey commented 4 years ago

This massively conflicts with #116 in the parser. Not got time to deal with that immediately - I can drop the parser changes and leave the rest.

kjbracey commented 4 years ago

Reworked incorporating #116. Didn't attempt to optimise new code from there, just worked the PRs together.

TeroJaasko commented 3 years ago

@kjbracey-arm Was there any conflicts or changes needed on your most recent rebase or can we just merge this in as local CI is happily still in green?

kjbracey commented 3 years ago

It just did an auto-merge on the rebase.