RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 13-May-2009 18:44:24 Branch: HEAD Handle: 2009051316442300 Modified files: rpm CHANGES rpm/lib rpmds.c Log: - rpmds: use _rpmdsPool, not heap, for rpmdsThis/rpmdsSingle as well. - rpmds: fix: rpmdsThis/rpmdsSingle assume ds->i = 0 (i.e. actively iterating). Summary: Revision Changes Path 1.2982 +3 -0 rpm/CHANGES 2.157 +4 -17 rpm/lib/rpmds.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.2981 -r1.2982 CHANGES --- rpm/CHANGES 12 May 2009 21:17:11 -0000 1.2981 +++ rpm/CHANGES 13 May 2009 16:44:23 -0000 1.2982 @@ -1,5 +1,8 @@ 5.2b1 -> 5.3a1 + - jbj: rpmds: use _rpmdsPool, not heap, for rpmdsThis/rpmdsSingle as well. + - jbj: rpmds: fix: rpmdsThis/rpmdsSingle assume ds->i = 0 + (i.e. actively iterating). - jbj: inline rpmlog() to avoid arglist overhead when -O2 is used. - jbj: add --with-valgrind homeopathy to measure existing RPM insturmentation effects on performance. @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmds.c ============================================================================ $ cvs diff -u -r2.156 -r2.157 rpmds.c --- rpm/lib/rpmds.c 12 May 2009 21:15:32 -0000 2.156 +++ rpm/lib/rpmds.c 13 May 2009 16:44:23 -0000 2.157 @@ -564,11 +564,7 @@ V = _free(V); R = _free(R); -#ifdef BUGGY ds = rpmdsGetPool(_rpmdsPool); -#else - ds = rpmdsGetPool(NULL); -#endif ds->Type = Type; ds->tagN = tagN; ds->Count = 1; @@ -589,6 +585,7 @@ pre[0] = ds->Type[0]; pre[1] = '\0'; /*...@-nullstate@*/ /* LCL: ds->Type may be NULL ??? */ + ds->i = 0; /* XXX rpmdsNewN() needs ds->i = 0, not -1 */ /*...@i@*/ ds->DNEVR = rpmdsNewDNEVR(pre, ds); /*...@=nullstate@*/ } @@ -598,16 +595,9 @@ rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, evrFlags Flags) { - rpmds ds = NULL; - const char * Type; - - Type = rpmdsTagName(tagN); + rpmds ds = rpmdsGetPool(_rpmdsPool); + const char * Type = rpmdsTagName(tagN); -#ifdef BUGGY - ds = rpmdsGetPool(_rpmdsPool); -#else - ds = rpmdsGetPool(NULL); -#endif ds->Type = Type; ds->tagN = tagN; ds->A = NULL; @@ -623,6 +613,7 @@ { char t[2]; t[0] = ds->Type[0]; t[1] = '\0'; + ds->i = 0; /* XXX rpmdsNewN() needs ds->i = 0, not -1 */ /*...@i@*/ ds->DNEVR = rpmdsNewDNEVR(t, ds); } @@ -950,11 +941,7 @@ static rpmds rpmdsDup(const rpmds ods) /*...@modifies ods @*/ { -#ifdef BUGGY rpmds ds = rpmdsGetPool(_rpmdsPool); -#else - rpmds ds = rpmdsGetPool(NULL); -#endif size_t nb; /*...@-assignexpose -castexpose @*/ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org