This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4edca4ad5f69c7be1ef178248e6d95bfb04e6875

commit 4edca4ad5f69c7be1ef178248e6d95bfb04e6875
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Jul 23 02:56:07 2024 +0200

    libdpkg: Add new varbuf C++ len() method
---
 lib/dpkg/varbuf.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/dpkg/varbuf.h b/lib/dpkg/varbuf.h
index 2738547e4..232dc8d2b 100644
--- a/lib/dpkg/varbuf.h
+++ b/lib/dpkg/varbuf.h
@@ -102,6 +102,8 @@ struct varbuf {
        varbuf &operator+=(const varbuf &v);
        varbuf &operator+=(int c);
        varbuf &operator+=(const char *str);
+
+       size_t len() const;
        const char *str();
 #endif
 };
@@ -384,6 +386,12 @@ varbuf::operator+=(const char *str)
        return *this;
 }
 
+inline size_t
+varbuf::len() const
+{
+       return this->used;
+}
+
 inline const char *
 varbuf::str()
 {

-- 
Dpkg.Org's dpkg

Reply via email to