]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.h
fix "Mismatched free() / delete / delete []" in simple_buffer
[apt.git] / apt-pkg / contrib / strutl.h
index a8bbc38af55ef1b04531fdb5aa23e96cdc5161da..c5c8e2382a54952a8ecf43575846eeb2ebf2d6fa 100644 (file)
@@ -22,6 +22,9 @@
 #include <cstring>
 #include <vector>
 #include <iostream>
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+#include <apt-pkg/string_view.h>
+#endif
 #include <time.h>
 #include <stddef.h>
 
@@ -75,7 +78,9 @@ bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base
 bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
 bool Base256ToNum(const char *Str,unsigned long long &Res,unsigned int Len);
 bool Hex2Num(const std::string &Str,unsigned char *Num,unsigned int Length);
-
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+APT_HIDDEN bool Hex2Num(const APT::StringView Str,unsigned char *Num,unsigned int Length);
+#endif
 // input changing string split
 bool TokSplitString(char Tok,char *Input,char **List,
                    unsigned long ListMax);