summaryrefslogtreecommitdiff
path: root/support/support.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-05-16 17:00:35 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-05-16 17:00:36 +0200
commit2afece36f6006844e87d7cb2fcb1ad8b220b2623 (patch)
tree52958dc70aaab18d73b3b3ecafc8adfacd0b7131 /support/support.h
parent9761bf4dfae04016bccaa82414719523b090dd60 (diff)
support: Add TEST_COMPARE_BLOB, support_quote_blob
The declaration of support_test_compare_blob uses unsigned long int, to avoid including <stddef.h>. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'support/support.h')
-rw-r--r--support/support.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/support.h b/support/support.h
index bc5827ed87..b61fe0735c 100644
--- a/support/support.h
+++ b/support/support.h
@@ -59,6 +59,12 @@ void support_shared_free (void *);
process on error. */
void support_write_file_string (const char *path, const char *contents);
+/* Quote the contents of the byte array starting at BLOB, of LENGTH
+ bytes, in such a way that the result string can be included in a C
+ literal (in single/double quotes, without putting the quotes into
+ the result). */
+char *support_quote_blob (const void *blob, size_t length);
+
/* Error-checking wrapper functions which terminate the process on
error. */