diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-11 07:37:12 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-02-11 07:37:12 +0000 |
commit | 9613406fbab1949f66fe7858590cab990c7b4b25 (patch) | |
tree | 573a6106da5bb7ead2c4f17c45be664063d67e01 /rdiff-backup/rdiff_backup/cmodule.c | |
parent | e18d568c6fdfa1a73fea01362d5bdf31aaa0d5b5 (diff) | |
download | rdiff-backup-9613406fbab1949f66fe7858590cab990c7b4b25.tar.gz |
First pass at integrating regress code
At this point most of the tests work, but there are still problems
with the finaltest error tests on /proc, and with some selection
options. The regress code is totally unchecked, and regresstest.py is
unwritten.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@277 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/cmodule.c')
-rw-r--r-- | rdiff-backup/rdiff_backup/cmodule.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/cmodule.c b/rdiff-backup/rdiff_backup/cmodule.c index b9e3e3e..6673ee5 100644 --- a/rdiff-backup/rdiff_backup/cmodule.c +++ b/rdiff-backup/rdiff_backup/cmodule.c @@ -36,6 +36,7 @@ static PyObject *UnknownFileTypeError; static PyObject *c_make_file_dict(PyObject *self, PyObject *args); static PyObject *long2str(PyObject *self, PyObject *args); static PyObject *str2long(PyObject *self, PyObject *args); +static PyObject *my_sync(PyObject *self); /* Turn a stat structure into a python dictionary. The preprocessor @@ -179,6 +180,15 @@ static PyObject *long2str(self, args) } +/* Run sync() and return None */ +static PyObject *my_sync(self) + PyObject *self; +{ + sync(); + return Py_BuildValue(""); +} + + /* Reverse of above; convert 7 byte string into python long */ static PyObject *str2long(self, args) PyObject *self; @@ -201,6 +211,7 @@ static PyMethodDef CMethods[] = { "Make dictionary from file stat"}, {"long2str", long2str, METH_VARARGS, "Convert python long to 7 byte string"}, {"str2long", str2long, METH_VARARGS, "Convert 7 byte string to python long"}, + {"sync", my_sync, METH_VARARGS, "sync buffers to disk"}, {NULL, NULL, 0, NULL} }; |