visy / oscpack

Automatically exported from code.google.com/p/oscpack
Other
0 stars 0 forks source link

1.1.0-RC1 changes parameter type in AsBlob API on 64 bit -- maybe rollback? #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Tim Blechmann writes:

just updated the supernova sources for this version of oscpack.

the AsBlob API has changed: the size argument has changed from unsigned long & 
to osc_bundle_element_size_t &, which is int32.
this caused a compile failure on linux/x86_64. maybe you can still
provide the old API or mention this in the changelog?

Original issue reported on code.google.com by ross.bencina on 7 Mar 2013 at 4:43

GoogleCodeExporter commented 8 years ago
Obvious options:

1. roll back to old API

2. keep current API and mention in CHANGES

3. provide old and new API (using overloading)

4. switch to a new API using a * rather than a & for the parameter -- as would 
be more common for an "OUT" parameter.

5. 4 + 3

Original comment by ross.bencina on 7 Mar 2013 at 4:45

GoogleCodeExporter commented 8 years ago
regarding 4:
using pointers is c-style, while references are c++-style. so personally, i'm 
in favor of references.

3 sounds the most best solution, though it could be problematic, if on one 
platform osc_bundle_element_size_t has the same type as unsigned long.

of course, one could also have a template argument for the size type.

Original comment by tim.klin...@gmail.com on 7 Mar 2013 at 9:11

GoogleCodeExporter commented 8 years ago
Decided to keep as-is (osc_bundle_element_size_t &, which is int32) and just 
document in the CHANGES file. (done in 117).

Original comment by ross.bencina on 26 Mar 2013 at 9:34