diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-11 13:59:41 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-11 13:59:41 +0000 |
commit | 66c01d903344201469b7c74390ffb801cd4c56f9 (patch) | |
tree | b2380644d7e662052045fa80672a229de3aa42f5 /URPM.xs | |
parent | 1da9c3b06209848ec5a9189763514fe7464dbe4e (diff) | |
download | perl-URPM-66c01d903344201469b7c74390ffb801cd4c56f9.tar perl-URPM-66c01d903344201469b7c74390ffb801cd4c56f9.tar.gz perl-URPM-66c01d903344201469b7c74390ffb801cd4c56f9.tar.bz2 perl-URPM-66c01d903344201469b7c74390ffb801cd4c56f9.tar.xz perl-URPM-66c01d903344201469b7c74390ffb801cd4c56f9.zip |
Add macro handling code from Olivier Thauvin
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -4095,4 +4095,34 @@ Urpm_stream2header(fp) Fclose(fd); } +void +expand(name) + char * name + PPCODE: + const char * value = rpmExpand(name, NULL); + XPUSHs(sv_2mortal(newSVpv(value, 0))); + +void +add_macro(macro) + char * macro + CODE: + rpmDefineMacro(NULL, macro, RMIL_DEFAULT); + +void +del_macro(name) + char * name + CODE: + delMacro(NULL, name); + +void +loadmacrosfile(filename) + char * filename + PPCODE: + rpmInitMacros(NULL, filename); + +void +resetmacros() + PPCODE: + rpmFreeMacros(NULL); + /* vim:set ts=8 sts=2 sw=2: */ |