diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index 19c1680f..0892b99e 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -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_unit_to_string(const struct sr_datafeed_analog2 *analog, 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 -------------------------------------------------------------*/ diff --git a/src/analog.c b/src/analog.c index d2677a57..db5ac1cf 100644 --- a/src/analog.c +++ b/src/analog.c @@ -273,7 +273,7 @@ SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog2 *analog, * @param p Numerator * @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->q = q;