Internal: Use C struct ndn_Blob where possible. Make ndn::Blob work with ndn_Blob.
diff --git a/ndn-cpp/c/publisher-public-key-digest.h b/ndn-cpp/c/publisher-public-key-digest.h
index 11d9dec..85891bf 100644
--- a/ndn-cpp/c/publisher-public-key-digest.h
+++ b/ndn-cpp/c/publisher-public-key-digest.h
@@ -8,6 +8,7 @@
#define NDN_PUBLISHERPUBLICKEYDIGEST_H
#include "common.h"
+#include "util/blob.h"
#ifdef __cplusplus
extern "C" {
@@ -18,8 +19,7 @@
* We make a separate struct since this is used by multiple other structs.
*/
struct ndn_PublisherPublicKeyDigest {
- uint8_t *publisherPublicKeyDigest; /**< pointer to pre-allocated buffer. 0 for none */
- size_t publisherPublicKeyDigestLength; /**< length of publisherPublicKeyDigest. 0 for none */
+ struct ndn_Blob publisherPublicKeyDigest; /**< A Blob whose value is a pointer to pre-allocated buffer. 0 for none */
};
/**
@@ -27,8 +27,7 @@
*/
static inline void ndn_PublisherPublicKeyDigest_initialize(struct ndn_PublisherPublicKeyDigest *self)
{
- self->publisherPublicKeyDigest = 0;
- self->publisherPublicKeyDigestLength = 0;
+ ndn_Blob_initialize(&self->publisherPublicKeyDigest, 0, 0);
}
#ifdef __cplusplus