lib: Add a lighter weight internal checksum wrapper
The faster (OpenSSL/GnuTLS) code lived in a `GInputStream` wrapper, and that adds a lot of weight (GObject + vtable calls). Move it into a simple autoptr-struct wrapper, and use it in the metadata path, so we're now using the faster checksums there too. This also drops a malloc there as the new API does hexdigest in place to a buffer. Prep for more work in the commit path to avoid `GInputStream` for local file commits, and ["adopting" files](https://github.com/ostreedev/ostree/pull/1255). Closes: #1256 Approved by: jlebon
This commit is contained in:
1 parent
bba7eb8069
commit
1c9975cbd1
9 files changed
+216
-176
No files matched your search
@@ -20,6 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ostree-core.h"
|
||||
#include "otutil.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@@ -77,7 +78,7 @@ gboolean _ostree_write_variant_with_size (GOutputStream *output,
|
||||
GVariant *variant,
|
||||
guint64 alignment_offset,
|
||||
gsize *out_bytes_written,
|
||||
GChecksum *checksum,
|
||||
OtChecksum *checksum,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
Reference in new issue
Block a user