summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-07-06 10:21:45 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-07-06 10:21:45 +0200
commit7e58ab0c0db9e5f27ae91251bf692bf79a046534 (patch)
tree8b353bbfa656fc53f01089b20757936a9049e389 /apt-pkg/pkgcachegen.h
parentaf5cf9299fb60c255d4c1c30ca9a97e7e6acfef0 (diff)
wrap the mmap actions in the CacheGenerator in their own methods to
be able to react on condition changes later then we can move mmap
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index ff0941e0c..a88c49451 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -31,9 +31,13 @@ class pkgIndexFile;
class pkgCacheGenerator /*{{{*/
{
private:
-
+
pkgCache::StringItem *UniqHash[26];
-
+ unsigned long WriteStringInMap(std::string const &String) { return WriteStringInMap(String.c_str()); };
+ unsigned long WriteStringInMap(const char *String);
+ unsigned long WriteStringInMap(const char *String, const unsigned long &Len);
+ unsigned long AllocateInMap(const unsigned long &size);
+
public:
class ListParser;
@@ -103,8 +107,8 @@ class pkgCacheGenerator::ListParser
inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);};
inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);};
- inline unsigned long WriteString(const string &S) {return Owner->Map.WriteString(S);};
- inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->Map.WriteString(S,Size);};
+ inline unsigned long WriteString(const string &S) {return Owner->WriteStringInMap(S);};
+ inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
bool NewDepends(pkgCache::VerIterator Ver,const string &Package, const string &Arch,
const string &Version,unsigned int Op,
unsigned int Type);