projects
/
deliverable
/
barectf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
776ea52
)
Fix: write float/double floating point numbers
author
Philippe Proulx
<eeppeliteloop@gmail.com>
Tue, 25 Nov 2014 23:22:28 +0000
(18:22 -0500)
committer
Philippe Proulx
<eeppeliteloop@gmail.com>
Tue, 25 Nov 2014 23:22:39 +0000
(18:22 -0500)
Casting them to unsigned integers does not keep the
IEEE 754 format.
barectf/cli.py
patch
|
blob
|
blame
|
history
diff --git
a/barectf/cli.py
b/barectf/cli.py
index c0945da70d2fe6c5bf3736100ce4003f45c0461d..3dd87fa0a8f4fcb40f0a7d144e278b37e7505955 100644
(file)
--- a/
barectf/cli.py
+++ b/
barectf/cli.py
@@
-895,7
+895,7
@@
class BarectfCodeGenerator:
elif t == 'double':
t = 'uint64_t'
- src_name_casted = '
({}) {}
'.format(t, src_name)
+ src_name_casted = '
*(({}*) &{})
'.format(t, src_name)
return self._template_to_clines(barectf.templates.WRITE_INTEGER,
sz=length, bo=bo, type=t,
This page took
0.023895 seconds
and
4
git commands to generate.