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

Method append_long_long

src/dpp/etf.cpp:104–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void etf_parser::append_long_long(etf_buffer *b, long long d) {
105 unsigned char buf[1 + 2 + sizeof(unsigned long long)];
106 buf[0] = ett_bigint_small;
107 buf[2] = d < 0 ? 1 : 0;
108 unsigned long long ull = d < 0 ? -d : d;
109 unsigned char bytes_enc = 0;
110 while (ull > 0) {
111 buf[3 + bytes_enc] = ull & 0xFF;
112 ull >>= 8;
113 bytes_enc++;
114 }
115 buf[1] = bytes_enc;
116 buffer_write(b, (const char *)buf, 1 + 2 + bytes_enc);
117}
118
119void etf_parser::append_double(etf_buffer *b, double f) {
120 unsigned char buf[1 + 8] = {0};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected