From: Uwe Hermann Date: Sun, 14 Oct 2018 18:18:40 +0000 (+0200) Subject: Revert API/ABI change for Context::create_analog_packet(). X-Git-Tag: libsigrok-0.5.1~5 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d2af13d03f7ab90d591da2fcf31d71b678fe8551;p=libsigrok.git Revert API/ABI change for Context::create_analog_packet(). This is fine in libsigrokcxx mainline, but for the 0.5.x series we need to remain API/ABI-compatible. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 5bc5dc2f..cdf7fd35 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -332,7 +332,7 @@ shared_ptr Context::create_logic_packet( shared_ptr Context::create_analog_packet( vector > channels, - const float *data_pointer, unsigned int num_samples, const Quantity *mq, + float *data_pointer, unsigned int num_samples, const Quantity *mq, const Unit *unit, vector mqflags) { auto analog = g_new0(struct sr_datafeed_analog, 1); @@ -370,7 +370,7 @@ shared_ptr Context::create_analog_packet( spec->spec_digits = 0; analog->num_samples = num_samples; - analog->data = (float*)data_pointer; + analog->data = data_pointer; auto packet = g_new(struct sr_datafeed_packet, 1); packet->type = SR_DF_ANALOG; packet->payload = analog; diff --git a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp index 80888af6..ba346315 100644 --- a/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp +++ b/bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp @@ -285,7 +285,7 @@ public: /** Create an analog packet. */ shared_ptr create_analog_packet( vector > channels, - const float *data_pointer, unsigned int num_samples, const Quantity *mq, + float *data_pointer, unsigned int num_samples, const Quantity *mq, const Unit *unit, vector mqflags); /** Load a saved session. * @param filename File name string. */