[Rpm-maint] [rpm-software-management/rpm] Stringify the rest of the internal c++ macro API (PR #3477)

Panu Matilainen notifications at github.com
Thu Nov 28 14:41:17 UTC 2024


The initial round left a lot of const char * arguments around, and trying to use this stuff, you bang your head into them sooner than later. 

These are rather small and straightforward patches and could be probaby squashed into larger commits, but should be at least easy to review in this format.

One noteworthy exception (noted also in the commit message) is the parametric macro options that can't be converted to a string just like that because NULL and "" are two entirely different meanings there (NULL option is a non-parametric macro and "" is a parametric macro that takes no options)
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/3477

-- Commit Summary --

  * And C++ native version of macro findEntry()
  * Make expand_this() take C++ string as the name argument
  * Make macros::init() take the macro path as C++ string
  * Make macros is_defined() and is_parametric() take the name as a C++ string
  * Make macros::pop() take name as a C++ string
  * Make macros::push() and push_aux() take name and body as C++ strings
  * Make macros::load() take file name as C++ string
  * Make macros::define() take the argument as a C++ string

-- File Changes --

    M rpmio/macro.cc (64)
    M rpmio/rpmmacro_internal.hh (18)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/3477.patch
https://github.com/rpm-software-management/rpm/pull/3477.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3477
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3477 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241128/1024f057/attachment.htm>


More information about the Rpm-maint mailing list