Projects
Extra
vlc-beta
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 281
View file
_service:obs_scm:vlc-beta-20260313.39d4722d9.obscpio/modules/misc/preparser_serializer/json/fromjson.c -> _service:obs_scm:vlc-beta-20260313.2b8892039.obscpio/modules/misc/preparser_serializer/json/fromjson.c
Changed
@@ -296,8 +296,23 @@ json_object_to_number(obj, name, number, error, -DBL_MAX, DBL_MAX) /* Ensure that the returned number is a float. */ -#define json_object_to_float(obj, name, number, error) \ - json_object_to_number(obj, name, (double *)(number), error, -FLT_MAX, FLT_MAX) +static inline bool json_object_to_float(const struct json_object *obj, + const char *name, float *number, + bool *error) +{ + + assert(obj != NULL); + assert(name != NULL); + assert(number != NULL); + assert(error != NULL); + + double n = NAN; + json_object_to_number(obj, name, &n, error, -FLT_MAX, FLT_MAX); + if (!*error) { + *number = (float)n; + } + return *error; +} /* Get value in `obj` with the key `name` and check if it's a string or null. */ @@ -1455,7 +1470,6 @@ #undef json_array_integer_load #undef json_array_boolean_load #undef json_array_foreach_ref -#undef json_object_to_float #undef json_object_to_double #undef json_object_to_int #undef json_object_to_uint
View file
_service:obs_scm:vlc-beta.obsinfo
Changed
@@ -1,4 +1,4 @@ name: vlc-beta -version: 20260313.39d4722d9 -mtime: 1773393386 -commit: 39d4722d9f8da63c98c0c5a8d7db417489b5464a +version: 20260313.2b8892039 +mtime: 1773397414 +commit: 2b889203975b93d7368a6e8c986b2024d31b5285
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.