diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-04-26 12:26:12 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-05-20 14:18:36 +0200 |
commit | ef00bd7af5b2bc0625df58482eacb4c2873c3647 (patch) | |
tree | cd9ac98b30dc14c3f239ff5883cc96696157a997 /apt-pkg/contrib/fileutl.h | |
parent | fdf9eef4d96a18d0167708499c993e1174251e88 (diff) |
convert EDSP to be based on FileFd instead of FILE*
I doubt there is any non-src:apt usage of these interfaces.
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index f33f7804b..13e9c610f 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -23,6 +23,9 @@ #include <apt-pkg/macros.h> #include <apt-pkg/aptconfiguration.h> +#ifdef APT_PKG_EXPOSE_STRING_VIEW +#include <apt-pkg/string_view.h> +#endif #include <string> #include <vector> @@ -89,6 +92,9 @@ class FileFd char* ReadLine(char *To, unsigned long long const Size); bool Flush(); bool Write(const void *From,unsigned long long Size); +#ifdef APT_PKG_EXPOSE_STRING_VIEW + APT_HIDDEN bool Write(APT::StringView From) { return Write(From.data(), From.size()); } +#endif bool static Write(int Fd, const void *From, unsigned long long Size); bool Seek(unsigned long long To); bool Skip(unsigned long long To); |