diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-06-30 07:50:34 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2003-06-30 07:50:34 +0000 |
commit | 4488947f39adcd35cf2b4bb167c87aad0d8a92b6 (patch) | |
tree | ca9ccbf6ff90ae702147c258d4a29ade0700f719 /rdiff-backup/rdiff_backup/cmodule.c | |
parent | 5e09353fe5ce80b724a30db11cb10523d147c6ec (diff) | |
download | rdiff-backup-4488947f39adcd35cf2b4bb167c87aad0d8a92b6.tar.gz |
Added ctime support (although it is not used)
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@335 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/cmodule.c')
-rw-r--r-- | rdiff-backup/rdiff_backup/cmodule.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rdiff-backup/rdiff_backup/cmodule.c b/rdiff-backup/rdiff_backup/cmodule.c index 59b93e2..0f01118 100644 --- a/rdiff-backup/rdiff_backup/cmodule.c +++ b/rdiff-backup/rdiff_backup/cmodule.c @@ -45,7 +45,7 @@ static PyObject *c_make_file_dict(self, args) PyObject *self; PyObject *args; { - PyObject *size, *inode, *mtime, *atime, *devloc, *return_val; + PyObject *size, *inode, *mtime, *atime, *ctime, *devloc, *return_val; char *filename, filetype[5]; STRUCT_STAT sbuf; long int mode, perms; @@ -82,9 +82,11 @@ static PyObject *c_make_file_dict(self, args) #if SIZEOF_TIME_T > SIZEOF_LONG mtime = PyLong_FromLongLong((LONG_LONG)sbuf.st_mtime); atime = PyLong_FromLongLong((LONG_LONG)sbuf.st_atime); + ctime = PyLong_FromLongLong((LONG_LONG)sbuf.st_ctime); #else mtime = PyInt_FromLong((long)sbuf.st_mtime); atime = PyInt_FromLong((long)sbuf.st_atime); + ctime = PyInt_FromLong((long)sbuf.st_ctime); #endif /* Build return dictionary from stat struct */ @@ -94,7 +96,7 @@ static PyObject *c_make_file_dict(self, args) else if S_ISDIR(mode) strcpy(filetype, "dir"); else if S_ISSOCK(mode) strcpy(filetype, "sock"); else strcpy(filetype, "fifo"); - return_val = Py_BuildValue("{s:s,s:O,s:l,s:l,s:l,s:O,s:O,s:l,s:O,s:O}", + return_val = Py_BuildValue("{s:s,s:O,s:l,s:l,s:l,s:O,s:O,s:l,s:O,s:O,s:O}", "type", filetype, "size", size, "perms", perms, @@ -104,7 +106,8 @@ static PyObject *c_make_file_dict(self, args) "devloc", devloc, "nlink", (long)sbuf.st_nlink, "mtime", mtime, - "atime", atime); + "atime", atime, + "ctime", ctime); } else if S_ISLNK(mode) { /* Symbolic links */ char linkname[1024]; @@ -160,6 +163,7 @@ static PyObject *c_make_file_dict(self, args) Py_DECREF(devloc); Py_DECREF(mtime); Py_DECREF(atime); + Py_DECREF(ctime); return return_val; } |