lib: commonize some precondition assertion macros
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 16 Apr 2020 17:12:55 +0000 (13:12 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 23 Apr 2020 03:45:20 +0000 (23:45 -0400)
commit2bdc32f7c635b6c8285e3923ad674118420402e1
tree12d88e492111a71c6caf89779ab9fdda2b2f9048
parent79545cc9503203b8508867244ef0265257fd3e84
lib: commonize some precondition assertion macros

1. Rename `assert-cond.h` to `assert-cond-base.h`.

2. Move common specialized pre/postcondition macros from
   `assert-cond-base.h` to `assert-cond.h`.

   Now `assert-cond-base.h` only contains the very basic
   pre/postcondition assertion macros.

3. Move common specialized macros from various internal header files to
   `assert-cond.h`.

4. Add new common specialized macros to `assert-cond.h`, mostly "non
   null" precondition assertion macros.

The goal of this patch is to make it easy to change code for many sites
at the same time when those sites use the same macro.

This patch introduces the common precondition assertion macros, but
does not use them in source files (future patch).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I2456e459bab9d942e4e11953b4afc5a6f4d30620
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3433
src/lib/Makefile.am
src/lib/assert-cond-base.h [new file with mode: 0644]
src/lib/assert-cond.h
src/lib/graph/message/message.h
src/lib/trace-ir/field-class.h
src/lib/trace-ir/field.c
src/lib/trace-ir/field.h
src/lib/value.c
This page took 0.025841 seconds and 4 git commands to generate.