MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / append_double

Method append_double

src/dpp/etf.cpp:119–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void etf_parser::append_double(etf_buffer *b, double f) {
120 unsigned char buf[1 + 8] = {0};
121 uint64_t val_64_out{0};
122 buf[0] = ett_new_float;
123 memcpy(&val_64_out, &f, sizeof(double));
124 store_64_bits(buf + 1, val_64_out);
125 buffer_write(b, (const char *)buf, 1 + 8);
126}
127
128void etf_parser::append_atom(etf_buffer *b, const char *bytes, size_t size) {
129 if (size < 255) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected