Skip to content

change ISC__BUFFER macros to inline functions

Evan Hunt requested to merge 3553-static-buffer-functions into main

previously, when ISC_BUFFER_USEINLINE was defined, macros were used to implement isc_buffer primitives (isc_buffer_init(), isc_buffer_region(), etc). these macros were missing the DbC assertions for those primitives, which made it possible for coding errors to go undetected.

adding the assertions to the macros caused compiler warnings on some platforms. therefore, this commit converts the ISC__BUFFER macros to static inline functions instead, with assertions included, and eliminates the non-inline implementation from buffer.c.

the --enable-buffer-useinline configure option has been removed.

Closes #3553 (closed)

Edited by Michał Kępień

Merge request reports