| 102 | } |
| 103 | |
| 104 | void 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 | |
| 119 | void etf_parser::append_double(etf_buffer *b, double f) { |
| 120 | unsigned char buf[1 + 8] = {0}; |
nothing calls this directly
no outgoing calls
no test coverage detected