aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs30
1 files changed, 30 insertions, 0 deletions
diff --git a/URPM.xs b/URPM.xs
index d6f5b4e..86ad375 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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: */