summaryrefslogtreecommitdiffstats
path: root/src/bplist.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-01-29 20:49:00 +0100
committerGravatar Jonathan Beck2009-01-29 20:49:00 +0100
commitf1d587b73eb3d8a7379e7c44f03257e6e553ca1b (patch)
treed5fd5843816d6e23275f53eb0e213a565995088f /src/bplist.c
parent296a38509d12306e423800ed2c583a94a31eddff (diff)
downloadlibplist-f1d587b73eb3d8a7379e7c44f03257e6e553ca1b.tar.gz
libplist-f1d587b73eb3d8a7379e7c44f03257e6e553ca1b.tar.bz2
Add setter and getter for Date and Unicode types.
Diffstat (limited to 'src/bplist.c')
-rw-r--r--src/bplist.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index d05c2e5..50840c2 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -332,6 +332,9 @@ static gpointer copy_plist_data(gconstpointer src, gpointer data)
dstdata->intval = srcdata->intval;
break;
case PLIST_DATE:
+ dstdata->timeval.tv_sec = srcdata->timeval.tv_sec;
+ dstdata->timeval.tv_usec = srcdata->timeval.tv_usec;
+ break;
case PLIST_REAL:
dstdata->realval = srcdata->realval;
break;
@@ -495,6 +498,9 @@ static guint plist_data_hash(gconstpointer key)
size = sizeof(gconstpointer);
break;
case PLIST_DATE:
+ buff = (char *) &(data->timeval);
+ size = data->length;
+ break;
default:
break;
}
@@ -551,6 +557,10 @@ static gboolean plist_data_compare(gconstpointer a, gconstpointer b)
return FALSE;
break;
case PLIST_DATE:
+ if (!memcmp(&(val_a->timeval), &(val_b->timeval),sizeof(GTimeVal)))
+ return TRUE;
+ else
+ return FALSE;
default:
break;
}