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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:12:56 +0000 (00:12 -0400)
commit130aea3e1b4ae2a448501ae3391682e693177f24
tree28acd8bb8aa836bb7428f7e9bdb443222142340e
parent5a25d385d62278c66a249fbbc569932edb4407bb
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.024219 seconds and 5 git commands to generate.