[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libapt-pkg: Are cache offsets part of the library interface?



Jason,

> >  - Getting the string via the iterator and using strcmp(). I believe
> >    this is the proper way to do it, yet it needs lots of cycles.

> Yes, this is the proper way, all the other ways won't work 100% with the
> current code base.

Well, looking at the cache file, the string "stable" appears only once,
although I have multiple sources, even from different "Label"s, so I
presumed that all strings would be interned. Since you say there is no
guarantee, I'll be going the strcmp() way.

> There are a couple strings that are ment to be unique such as the
> architecture and the package names (since they are never written more than
> once) but in those cases it is generally meaningless to do comparison on
> them anyhow.

Well, every system has at least two architectures, its platform and
"all", so I might need comparison here.

Thanks,
   Simon



Reply to: