util: Improve prototype of debug_get_num_option and debug_get_flags_option
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 2 Nov 2022 06:46:16 +0000 (14:46 +0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 16 Dec 2022 19:30:19 +0000 (19:30 +0000)
commit501a46fd69fb7368fcd095ad0325c742849e005b
tree384326598e01ff2a4ebe97fcdc3139ae5297dd56
parent2794ad39fd984e4d13bb294b6853f03de68d8a1c
util: Improve prototype of debug_get_num_option and debug_get_flags_option

Getting debug_get_num_option to return int64_t, as long under 64 bit Linux are 64 bit size,
 so using fixed int64_t for cross platform consistence, as long under win32 is 32 bit size.

Getting DEBUG_GET_ONCE_FLAGS_OPTION to return uint64_t to getting it to be
consistence with debug_get_flags_option.

DEBUG_GET_ONCE_NUM_OPTION is not accessed in codebase, so add unittest for it, it maybe
used in future, remove it is not consistence

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19554>
src/util/tests/u_debug_test.cpp
src/util/u_debug.c
src/util/u_debug.h