lib: Make bt_value_null a const pointer
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 3 Apr 2019 16:08:11 +0000 (12:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:39 +0000 (18:19 -0400)
commit038be9903108fbf49bef18e6f6bd6936e8fabde8
tree4b2462a6e01da85e0d44b013fd167f339c174ea6
parent62f543612ff766259bee1fff7e64e5861950cdd9
lib: Make bt_value_null a const pointer

We probably don't want anything to change the value of this pointer,
which points to the only instance of BT_VALUE_TYPE_NULL,
bt_value_null_instance.  Therefore, declare it as a constant value.

It also helps a little bit the Python bindings: if we copy the
declaration verbatim to the .i file, without const, bt_value_null is
available through the special "cvar" global object (and can be
modified!).  With const, it becomes read-only, so can be accessed
directly as native_bt.value_null.

Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
include/babeltrace/value.h
lib/value.c
This page took 0.025214 seconds and 4 git commands to generate.