summaryrefslogtreecommitdiffstats
path: root/rpmmodule
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-02-01 20:25:17 +0000
committerMatt Wilson <msw@redhat.com>2000-02-01 20:25:17 +0000
commitf612d58f9e88130dfa8ad92e2a8a4453eb46af88 (patch)
tree0261729801766e267241d1293516db65725d61ab /rpmmodule
parent0846c553048be0f46215fe9e073b046cc2c43c97 (diff)
downloadanaconda-f612d58f9e88130dfa8ad92e2a8a4453eb46af88.tar.gz
anaconda-f612d58f9e88130dfa8ad92e2a8a4453eb46af88.tar.xz
anaconda-f612d58f9e88130dfa8ad92e2a8a4453eb46af88.zip
delmacro binding
Diffstat (limited to 'rpmmodule')
-rw-r--r--rpmmodule/rpmmodule.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/rpmmodule/rpmmodule.c b/rpmmodule/rpmmodule.c
index f0ffa5ca2..88bb677ca 100644
--- a/rpmmodule/rpmmodule.c
+++ b/rpmmodule/rpmmodule.c
@@ -42,6 +42,7 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args);
void initrpm(void);
static PyObject * doAddMacro(PyObject * self, PyObject * args);
+static PyObject * doDelMacro(PyObject * self, PyObject * args);
static rpmdbObject * rpmOpenDB(PyObject * self, PyObject * args);
static PyObject * hdrLoad(PyObject * self, PyObject * args);
static PyObject * rpmHeaderFromPackage(PyObject * self, PyObject * args);
@@ -71,6 +72,7 @@ static PyObject * doFopen(PyObject * self, PyObject * args);
static PyMethodDef rpmModuleMethods[] = {
{ "TransactionSet", (PyCFunction) rpmtransCreate, METH_VARARGS, NULL },
{ "addMacro", (PyCFunction) doAddMacro, METH_VARARGS, NULL },
+ { "delMacro", (PyCFunction) doDelMacro, METH_VARARGS, NULL },
{ "archscore", (PyCFunction) archScore, METH_VARARGS, NULL },
{ "findUpgradeSet", (PyCFunction) findUpgradeSet, METH_VARARGS, NULL },
{ "headerFromPackage", (PyCFunction) rpmHeaderFromPackage, METH_VARARGS, NULL },
@@ -1476,6 +1478,18 @@ static PyObject * doAddMacro(PyObject * self, PyObject * args) {
return Py_None;
}
+static PyObject * doDelMacro(PyObject * self, PyObject * args) {
+ char * name;
+
+ if (!PyArg_ParseTuple(args, "s", &name))
+ return NULL;
+
+ delMacro(NULL, name);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static int closeCallback(FILE * f) {
/* XXX FD_t leak */
/* XXX lookup the FD_t from the fp and close with Fclose */