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

Method append_unsigned_long_long

src/dpp/etf.cpp:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void etf_parser::append_unsigned_long_long(etf_buffer *b, unsigned long long d) {
89 unsigned char buf[1 + 2 + sizeof(unsigned long long)];
90 buf[0] = ett_bigint_small;
91
92 unsigned char bytes_enc = 0;
93 while (d > 0) {
94 buf[3 + bytes_enc] = d & 0xFF;
95 d >>= 8;
96 bytes_enc++;
97 }
98 buf[1] = bytes_enc;
99 buf[2] = 0;
100
101 buffer_write(b, (const char *)buf, 1 + 2 + bytes_enc);
102}
103
104void etf_parser::append_long_long(etf_buffer *b, long long d) {
105 unsigned char buf[1 + 2 + sizeof(unsigned long long)];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected