diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-30 06:00:56 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-12-01 01:46:26 -0800 |
commit | bb6bb6d60bf7e9c0bd5acb102bed9e3f4417dae8 (patch) | |
tree | cfeac1f201c6210fd8b7fce2ae736a47b5ff8a0d | |
parent | 0a377825005a118bc5f14a26bee745ec432a1a70 (diff) |
Store Package::metadata_ as a pointer, not a Cytore::Offset<>.
-rw-r--r-- | MobileCydia.mm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 10e8199..970ffa3 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1459,7 +1459,7 @@ struct MetaValue : static Cytore::File<MetaValue> MetaFile_; // }}} // Cytore Helper Functions {{{ -static PackageValue *PackageFind(const char *name, size_t length, Cytore::Offset<PackageValue> *cache = NULL) { +static PackageValue *PackageFind(const char *name, size_t length) { SplitHash nhash = { hashlittle(name, length) }; PackageValue *metadata; @@ -1480,9 +1480,6 @@ static PackageValue *PackageFind(const char *name, size_t length, Cytore::Offset } } - if (cache != NULL) - *cache = *offset; - return metadata; } @@ -1856,7 +1853,7 @@ struct ParsedPackage { NSMutableArray *tags_; NSString *role_; - Cytore::Offset<PackageValue> metadata_; + PackageValue *metadata_; bool ignored_; } @@ -2260,7 +2257,8 @@ struct PackageNameOrdering : _end _profile(Package$initWithVersion$Metadata) - PackageValue *metadata(PackageFind(id_.data(), id_.size(), &metadata_)); + PackageValue *metadata(PackageFind(id_.data(), id_.size())); + metadata_ = metadata; const char *latest(version_.VerStr()); size_t length(strlen(latest)); @@ -2413,7 +2411,7 @@ struct PackageNameOrdering : } - (PackageValue *) metadata { - return &MetaFile_.Get(metadata_); + return metadata_; } - (time_t) seen { |