@@ -194,45 +194,45 @@ bool msgpack_unpacker_flush_zone(msgpack_unpacker* mpac);
194194
195195bool msgpack_unpacker_expand_buffer (msgpack_unpacker * mpac , size_t size );
196196
197- bool msgpack_unpacker_reserve_buffer (msgpack_unpacker * mpac , size_t size )
197+ static inline bool msgpack_unpacker_reserve_buffer (msgpack_unpacker * mpac , size_t size )
198198{
199199 if (mpac -> free >= size ) { return true; }
200200 return msgpack_unpacker_expand_buffer (mpac , size );
201201}
202202
203- char * msgpack_unpacker_buffer (msgpack_unpacker * mpac )
203+ static inline char * msgpack_unpacker_buffer (msgpack_unpacker * mpac )
204204{
205205 return mpac -> buffer + mpac -> used ;
206206}
207207
208- size_t msgpack_unpacker_buffer_capacity (const msgpack_unpacker * mpac )
208+ static inline size_t msgpack_unpacker_buffer_capacity (const msgpack_unpacker * mpac )
209209{
210210 return mpac -> free ;
211211}
212212
213- void msgpack_unpacker_buffer_consumed (msgpack_unpacker * mpac , size_t size )
213+ static inline void msgpack_unpacker_buffer_consumed (msgpack_unpacker * mpac , size_t size )
214214{
215215 mpac -> used += size ;
216216 mpac -> free -= size ;
217217}
218218
219- size_t msgpack_unpacker_message_size (const msgpack_unpacker * mpac )
219+ static inline size_t msgpack_unpacker_message_size (const msgpack_unpacker * mpac )
220220{
221221 return mpac -> parsed - mpac -> off + mpac -> used ;
222222}
223223
224- size_t msgpack_unpacker_parsed_size (const msgpack_unpacker * mpac )
224+ static inline size_t msgpack_unpacker_parsed_size (const msgpack_unpacker * mpac )
225225{
226226 return mpac -> parsed ;
227227}
228228
229229
230- void msgpack_unpacked_init (msgpack_unpacked * result )
230+ static inline void msgpack_unpacked_init (msgpack_unpacked * result )
231231{
232232 memset (result , 0 , sizeof (msgpack_unpacked ));
233233}
234234
235- void msgpack_unpacked_destroy (msgpack_unpacked * result )
235+ static inline void msgpack_unpacked_destroy (msgpack_unpacked * result )
236236{
237237 if (result -> zone != NULL ) {
238238 msgpack_zone_free (result -> zone );
@@ -241,7 +241,7 @@ void msgpack_unpacked_destroy(msgpack_unpacked* result)
241241 }
242242}
243243
244- msgpack_zone * msgpack_unpacked_release_zone (msgpack_unpacked * result )
244+ static inline msgpack_zone * msgpack_unpacked_release_zone (msgpack_unpacked * result )
245245{
246246 if (result -> zone != NULL ) {
247247 msgpack_zone * z = result -> zone ;
0 commit comments