diff options
author | Matt Wilson <msw@redhat.com> | 2001-07-02 20:08:09 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-07-02 20:08:09 +0000 |
commit | 3fd75c3831c228d78c55be355a203c9779b78429 (patch) | |
tree | 8f1c4a501d447b9b8220bc51a30a467336e6ffee /isys/isys.c | |
parent | 0baae10db4618879a162f0b2d614443d87d941ca (diff) | |
download | anaconda-3fd75c3831c228d78c55be355a203c9779b78429.tar.gz anaconda-3fd75c3831c228d78c55be355a203c9779b78429.tar.xz anaconda-3fd75c3831c228d78c55be355a203c9779b78429.zip |
add magik incantations to root out the evil within the fsset code
Diffstat (limited to 'isys/isys.c')
-rw-r--r-- | isys/isys.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/isys/isys.c b/isys/isys.c index f2507dec9..5741ad326 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -93,6 +93,7 @@ static PyObject * doSync(PyObject * s, PyObject * args); static PyObject * doisIsoImage(PyObject * s, PyObject * args); static PyObject * dogetGeometry(PyObject * s, PyObject * args); static PyObject * getFramebufferInfo(PyObject * s, PyObject * args); +static PyObject * printObject(PyObject * s, PyObject * args); static PyMethodDef isysModuleMethods[] = { { "ejectcdrom", (PyCFunction) doEjectCdrom, METH_VARARGS, NULL }, @@ -142,6 +143,7 @@ static PyMethodDef isysModuleMethods[] = { { "isisoimage", (PyCFunction) doisIsoImage, METH_VARARGS, NULL}, { "getGeometry", (PyCFunction) dogetGeometry, METH_VARARGS, NULL}, { "fbinfo", (PyCFunction) getFramebufferInfo, METH_VARARGS, NULL}, + { "printObject", (PyCFunction) printObject, METH_VARARGS, NULL}, { NULL } } ; @@ -1528,3 +1530,15 @@ static PyObject * getFramebufferInfo(PyObject * s, PyObject * args) { return Py_BuildValue("(iii)", fb.xres, fb.yres, fb.bits_per_pixel); } +static PyObject * printObject (PyObject * o, PyObject * args) { + PyObject * obj; + char buf[256]; + + if (!PyArg_ParseTuple(args, "O", &obj)) + return NULL; + + snprintf(buf, 256, "<%s object at %lx>", obj->ob_type->tp_name, + (long) obj); + + return PyString_FromString(buf); +} |