* appendBinaryStringInfoNT * * Append arbitrary binary data to a StringInfo, allocating more space * if necessary. Does not ensure a trailing null-byte exists. */
| 266 | * if necessary. Does not ensure a trailing null-byte exists. |
| 267 | */ |
| 268 | void |
| 269 | appendBinaryStringInfoNT(StringInfo str, const char *data, int datalen) |
| 270 | { |
| 271 | Assert(str != NULL); |
| 272 | |
| 273 | /* Make more room if needed */ |
| 274 | enlargeStringInfo(str, datalen); |
| 275 | |
| 276 | /* OK, append the data */ |
| 277 | memcpy(str->data + str->len, data, datalen); |
| 278 | str->len += datalen; |
| 279 | } |
| 280 | |
| 281 | /* |
| 282 | * enlargeStringInfo |
no test coverage detected