Re: [Rpm-maint] [rpm-software-management/rpm] Convert macro table to STL containers + native strings (PR #3062)
Merged #3062 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3062#event-12652690152 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Convert macro table to STL containers + native strings (PR #3062)
The final commit turns the macro entry stack into an STL container too, making the macro entries themselves freestanding and since all this is now standard library stuff we don't need to manually clean up and deallocate etc. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3062#issuecomment-2082100677 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Convert macro table to STL containers + native strings (PR #3062)
@pmatilai pushed 3 commits. 9c28251cdb3664839a5a03b6f6b15f096653483b Add copy control and in particular, destructor to the macro context 3ff1f78c49d63d75b30cc46607edfb148cb5e948 Convert macro table to STL containers + native strings a06877ec1ed1fd5ac8cbaae8100288a2b220fd5c Untangle the per-name stack from the macro entry struct -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/3062/files/e551a36f8300347f90a54e25e73e32c53cfb0a37..a06877ec1ed1fd5ac8cbaae8100288a2b220fd5c You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Convert macro table to STL containers + native strings (PR #3062)
Use an STL map for the macro entry table, this matches exactly the behavior we manually did with the C array. The variable length array at end of macro entry structs is not really C++, use native strings for the storage. Its slower, but not tragically so. For now, keep name, opts and body as const char pointers though to the c_str() items to avoid having to change everything at once. Popping macros is a bit clunky and repetitive, well clean it up later. findEntry() returns a pointer to the macro entry itself instead of pointer to pointer, which simplifies things a bit further. This is a wee bit slower than the raw C counterpart, but by no means tragically so and moving to native structures opens up other opportunities in turn, both optimization and feature wise. Further work will be easier now that the highly optimized but also tangled up data structure is (mostly) untangled. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/3062 -- Commit Summary -- * Add copy control and in particular, destructor to the macro context * Convert macro table to STL containers + native strings -- File Changes -- M rpmio/macro.c (245) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/3062.patch https://github.com/rpm-software-management/rpm/pull/3062.diff -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/3062 You are receiving this because you are subscribed to this thread. Message ID: rpm-software-management/rpm/pull/3...@github.com ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint