sr_rational_set: Accept signed numerator.
This commit is contained in:
parent
18ea6b76fd
commit
53e5d3d14d
|
@ -33,7 +33,7 @@ SR_API int sr_analog_to_float(const struct sr_datafeed_analog2 *analog,
|
||||||
SR_API int sr_analog_float_to_string(float value, int digits, char **result);
|
SR_API int sr_analog_float_to_string(float value, int digits, char **result);
|
||||||
SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog,
|
SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog,
|
||||||
char **result);
|
char **result);
|
||||||
SR_API void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q);
|
SR_API void sr_rational_set(struct sr_rational *r, int64_t p, uint64_t q);
|
||||||
|
|
||||||
/*--- backend.c -------------------------------------------------------------*/
|
/*--- backend.c -------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog,
|
||||||
* @param p Numerator
|
* @param p Numerator
|
||||||
* @param q Denominator
|
* @param q Denominator
|
||||||
*/
|
*/
|
||||||
SR_API void sr_rational_set(struct sr_rational *r, uint64_t p, uint64_t q)
|
SR_API void sr_rational_set(struct sr_rational *r, int64_t p, uint64_t q)
|
||||||
{
|
{
|
||||||
r->p = p;
|
r->p = p;
|
||||||
r->q = q;
|
r->q = q;
|
||||||
|
|
Loading…
Reference in New Issue