obs-data: Internally store as int or double
If integers are used, then store as integers. If doubles are used, then store as doubles. This way precision issues are prevented.
This commit is contained in:
@@ -46,6 +46,12 @@ enum obs_data_type {
|
||||
OBS_DATA_ARRAY
|
||||
};
|
||||
|
||||
enum obs_data_number_type {
|
||||
OBS_DATA_NUM_INVALID,
|
||||
OBS_DATA_NUM_INT,
|
||||
OBS_DATA_NUM_DOUBLE
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Main usage functions */
|
||||
|
||||
@@ -122,6 +128,7 @@ EXPORT void obs_data_item_remove(obs_data_item_t *item);
|
||||
|
||||
/* Gets Item type */
|
||||
EXPORT enum obs_data_type obs_data_item_gettype(obs_data_item_t item);
|
||||
EXPORT enum obs_data_number_type obs_data_item_numtype(obs_data_item_t item);
|
||||
|
||||
/* Item set functions */
|
||||
EXPORT void obs_data_item_setstring(obs_data_item_t *item, const char *val);
|
||||
|
Reference in New Issue
Block a user