From: Janne H. <jjh...@gm...> - 2008-04-23 17:47:29
|
Hi Philippe, Sorry for taking so long to do this, life has been busy lately. I added your patch under our issue DB so that it gets tracked properly. See my notes here: http://code.google.com/p/ocaml-extlib/issues/detail?id=6 I added a couple of notes in the bug item. The important part is that I'd name these functions read/write_float32 instead of *_float. See the bug for more details. Furthermore, I'd appreciate if you could also send a patch that adds a unit test that tests your new functions. Since your new functions are rather simple, I'd go for something very simple like writing "1.0" as an a 32-bit int (0x3F800000) into a string IO channel and reading it back with your new functions and comparing the result against 1.0. The unit tests are in "ocaml-extlib/trunk/test". To run them, do: cd ocaml-extlib/trunk/test make make run make opt make run Adding a new test case is rather straightforward. I'd add a wiki page to explain how to add them, but at the moment code.google.com's wiki is down for maintenance and I add new pages. Janne On Sun, Apr 6, 2008 at 2:09 PM, Philippe Strauss <ph...@ph...> wrote: > > > > > Hello, > > I wanted to read some data written "raw" in float32 format by a python program, and noticed than extlib didn't have (at least at v 1.5) functions to write or read float32, double precision float are supported. > > Here's a small patch, feel free to use it. > > Regards. > > > -- > Philippe Strauss > ph...@ph... > > > > > |