[Pkg-gtkpod-devel] Bug#706378: Updated debdiff

Michael Wild themiwi at users.sourceforge.net
Mon Apr 29 11:53:01 UTC 2013


I mistakenly attached an old debdiff, here is the current one.
-------------- next part --------------
diff -Nru libplist-1.8/cmake/libplistPackaging.cmake libplist-1.10/cmake/libplistPackaging.cmake
--- libplist-1.8/cmake/libplistPackaging.cmake	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/cmake/libplistPackaging.cmake	2013-03-19 17:34:11.000000000 +0100
@@ -7,9 +7,9 @@
   SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.LESSER")
   SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "PList library")
   SET(CPACK_COMPONENT_DEV_DISPLAY_NAME "PList development files")
-  SET(CPACK_COMPONENT_PLUTIL_DISPLAY_NAME "PList conversion tool")
+  SET(CPACK_COMPONENT_PLISTUTIL_DISPLAY_NAME "PList conversion tool")
   set(CPACK_COMPONENT_DEV_DEPENDS lib)
-  set(CPACK_COMPONENT_PLUTIL_DEPENDS lib)
+  set(CPACK_COMPONENT_PLISTUTIL_DEPENDS lib)
   INCLUDE( CPack )
 
 ENDMACRO( LIBPLIST_PACKAGE )
diff -Nru libplist-1.8/CMakeLists.txt libplist-1.10/CMakeLists.txt
--- libplist-1.8/CMakeLists.txt	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/CMakeLists.txt	2013-03-19 17:34:11.000000000 +0100
@@ -1,11 +1,11 @@
 PROJECT( libplist )
 
 SET( LIBPLIST_VERSION_MAJOR "1" )
-SET( LIBPLIST_VERSION_MINOR "8" )
+SET( LIBPLIST_VERSION_MINOR "10" )
 SET( LIBPLIST_SOVERSION "1" )
 SET( LIBPLIST_VERSION "${LIBPLIST_VERSION_MAJOR}.${LIBPLIST_VERSION_MINOR}" )
 SET( LIBPLIST_LIBVERSION "${LIBPLIST_SOVERSION}.${LIBPLIST_VERSION}" )
-SET( PLUTIL_VERSION ${LIBPLIST_VERSION} )
+SET( PLISTUTIL_VERSION ${LIBPLIST_VERSION} )
 
 SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/modules )
 
@@ -53,10 +53,12 @@
 
 ADD_SUBDIRECTORY( libcnary )
 ADD_SUBDIRECTORY( src )
-ADD_SUBDIRECTORY( plutil )
+ADD_SUBDIRECTORY( plistutil )
 ADD_SUBDIRECTORY( include )
 ADD_SUBDIRECTORY( test )
 
+ADD_DEPENDENCIES( plist libcnary )
+
 IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
 	ADD_SUBDIRECTORY( swig )
 ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
diff -Nru libplist-1.8/cython/plist.pxd libplist-1.10/cython/plist.pxd
--- libplist-1.8/cython/plist.pxd	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/cython/plist.pxd	2013-03-19 17:34:11.000000000 +0100
@@ -1,3 +1,5 @@
+from libc.stdint cimport *
+
 cdef extern from "plist/plist.h":
     ctypedef void *plist_t
     ctypedef void *plist_dict_iter
@@ -14,10 +16,18 @@
 cdef class Bool(Node):
     cpdef set_value(self, object value)
     cpdef bint get_value(self)
-    
+
 cdef class Integer(Node):
     cpdef set_value(self, object value)
-    cpdef int get_value(self)
+    cpdef uint64_t get_value(self)
+
+cdef class Uid(Node):
+    cpdef set_value(self, object value)
+    cpdef uint64_t get_value(self)
+
+cdef class Key(Node):
+    cpdef set_value(self, object value)
+    cpdef unicode get_value(self)
 
 cdef class Real(Node):
     cpdef set_value(self, object value)
diff -Nru libplist-1.8/cython/plist.pyx libplist-1.10/cython/plist.pyx
--- libplist-1.8/cython/plist.pyx	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/cython/plist.pyx	2013-03-19 17:34:11.000000000 +0100
@@ -1,16 +1,6 @@
-cdef extern from *:
-    ctypedef unsigned char uint8_t
-    ctypedef short int int16_t
-    ctypedef unsigned short int uint16_t
-    ctypedef unsigned int uint32_t
-    ctypedef int int32_t
-IF UNAME_MACHINE == 'x86_64':
-    ctypedef unsigned long int uint64_t
-ELSE:
-    ctypedef unsigned long long int uint64_t
-
 cimport cpython
 cimport libc.stdlib
+from libc.stdint cimport *
 
 cdef extern from *:
     ctypedef enum plist_type:
@@ -23,6 +13,7 @@
         PLIST_DATE,
         PLIST_DATA,
         PLIST_KEY,
+        PLIST_UID,
         PLIST_NONE
 
     plist_t plist_new_bool(uint8_t val)
@@ -41,6 +32,14 @@
     void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec)
     void plist_set_date_val(plist_t node, int32_t sec, int32_t usec)
 
+    plist_t plist_new_key(char *val)
+    void plist_get_key_val(plist_t node, char **val)
+    void plist_set_key_val(plist_t node, char *val)
+
+    plist_t plist_new_uid(uint64_t val)
+    void plist_get_uid_val(plist_t node, uint64_t *val)
+    void plist_set_uid_val(plist_t node, uint64_t val)
+
     plist_t plist_new_string(char *val)
     void plist_get_string_val(plist_t node, char **val)
     void plist_set_string_val(plist_t node, char *val)
@@ -186,7 +185,7 @@
             self._c_node = plist_new_uint(int(value))
 
     def __repr__(self):
-        cdef int i = self.get_value()
+        cdef uint64_t i = self.get_value()
         return '<Integer: %s>' % i
 
     def __int__(self):
@@ -213,7 +212,7 @@
     cpdef set_value(self, object value):
         plist_set_uint_val(self._c_node, int(value))
 
-    cpdef int get_value(self):
+    cpdef uint64_t get_value(self):
         cdef uint64_t value
         plist_get_uint_val(self._c_node, &value)
         return value
@@ -270,8 +269,125 @@
     instance._c_node = c_node
     return instance
 
+cdef class Uid(Node):
+    def __cinit__(self, object value=None, *args, **kwargs):
+        if value is None:
+            self._c_node = plist_new_uid(0)
+        else:
+            self._c_node = plist_new_uid(int(value))
+
+    def __repr__(self):
+        cdef uint64_t i = self.get_value()
+        return '<Uid: %s>' % i
+
+    def __int__(self):
+        return self.get_value()
+
+    def __float__(self):
+        return float(self.get_value())
+
+    def __richcmp__(self, other, op):
+        cdef int i = self.get_value()
+        if op == 0:
+            return i < other
+        if op == 1:
+            return i <= other
+        if op == 2:
+            return i == other
+        if op == 3:
+            return i != other
+        if op == 4:
+            return i > other
+        if op == 5:
+            return i >= other
+
+    cpdef set_value(self, object value):
+        plist_set_uid_val(self._c_node, int(value))
+
+    cpdef uint64_t get_value(self):
+        cdef uint64_t value
+        plist_get_uid_val(self._c_node, &value)
+        return value
+
+cdef Uid Uid_factory(plist_t c_node, bint managed=True):
+    cdef Uid instance = Uid.__new__(Uid)
+    instance._c_managed = managed
+    instance._c_node = c_node
+    return instance
+
 from cpython cimport PY_MAJOR_VERSION
 
+cdef class Key(Node):
+    def __cinit__(self, object value=None, *args, **kwargs):
+        cdef:
+            char* c_utf8_data = NULL
+            bytes utf8_data
+        if value is None:
+            raise ValueError("Requires a value")
+        else:
+            if isinstance(value, unicode):
+                utf8_data = value.encode('utf-8')
+            elif (PY_MAJOR_VERSION < 3) and isinstance(value, str):
+                value.encode('ascii') # trial decode
+                utf8_data = value.encode('ascii')
+            else:
+                raise ValueError("Requires unicode input, got %s" % type(value))
+            c_utf8_data = utf8_data
+            self._c_node = plist_new_string("")
+            plist_set_type(self._c_node, PLIST_KEY)
+            #plist_set_key_val(self._c_node, c_utf8_data)
+
+    def __repr__(self):
+        s = self.get_value()
+        return '<Key: %s>' % s.encode('utf-8')
+
+    def __richcmp__(self, other, op):
+        cdef unicode s = self.get_value()
+        if op == 0:
+            return s < other
+        if op == 1:
+            return s <= other
+        if op == 2:
+            return s == other
+        if op == 3:
+            return s != other
+        if op == 4:
+            return s > other
+        if op == 5:
+            return s >= other
+
+    cpdef set_value(self, object value):
+        cdef:
+            char* c_utf8_data = NULL
+            bytes utf8_data
+        if value is None:
+            plist_set_key_val(self._c_node, c_utf8_data)
+        else:
+            if isinstance(value, unicode):
+                utf8_data = value.encode('utf-8')
+            elif (PY_MAJOR_VERSION < 3) and isinstance(value, str):
+                value.encode('ascii') # trial decode
+                utf8_data = value.encode('ascii')
+            else:
+                raise ValueError("Requires unicode input, got %s" % type(value))
+            c_utf8_data = utf8_data
+            plist_set_key_val(self._c_node, c_utf8_data)
+
+    cpdef unicode get_value(self):
+        cdef:
+            char* c_value = NULL
+        plist_get_key_val(self._c_node, &c_value)
+        try:
+            return cpython.PyUnicode_DecodeUTF8(c_value, len(c_value), 'strict')
+        finally:
+            libc.stdlib.free(c_value)
+
+cdef Key Key_factory(plist_t c_node, bint managed=True):
+    cdef Key instance = Key.__new__(Key)
+    instance._c_managed = managed
+    instance._c_node = c_node
+    return instance
+
 cdef class String(Node):
     def __cinit__(self, object value=None, *args, **kwargs):
         cdef:
@@ -283,8 +399,8 @@
             if isinstance(value, unicode):
                 utf8_data = value.encode('utf-8')
             elif (PY_MAJOR_VERSION < 3) and isinstance(value, str):
-                value.decode('ascii') # trial decode
-                utf8_data = value.decode('ascii')
+                value.encode('ascii') # trial decode
+                utf8_data = value.encode('ascii')
             else:
                 raise ValueError("Requires unicode input, got %s" % type(value))
             c_utf8_data = utf8_data
@@ -319,8 +435,8 @@
             if isinstance(value, unicode):
                 utf8_data = value.encode('utf-8')
             elif (PY_MAJOR_VERSION < 3) and isinstance(value, str):
-                value.decode('ascii') # trial decode
-                utf8_data = value.decode('ascii')
+                value.encode('ascii') # trial decode
+                utf8_data = value.encode('ascii')
             else:
                 raise ValueError("Requires unicode input, got %s" % type(value))
             c_utf8_data = utf8_data
@@ -331,7 +447,7 @@
             char* c_value = NULL
         plist_get_string_val(self._c_node, &c_value)
         try:
-            return cpython.PyUnicode_DecodeUTF8(c_value, libc.stdlib.strlen(c_value), 'strict')
+            return cpython.PyUnicode_DecodeUTF8(c_value, len(c_value), 'strict')
         finally:
             libc.stdlib.free(c_value)
 
@@ -512,9 +628,7 @@
         return '<Dict: %s>' % self._map
 
     cpdef dict get_value(self):
-        cdef dict result = cpython.PyDict_New()
         return dict([(key, value.get_value()) for key, value in self.items()])
-        return result
 
     cpdef set_value(self, dict value):
         plist_free(self._c_node)
@@ -546,7 +660,6 @@
 
     cpdef list values(self):
         return cpython.PyDict_Values(self._map)
-        return self._map.values()
 
     cpdef object itervalues(self):
         return self._map.itervalues()
@@ -716,6 +829,8 @@
         return Bool_factory(c_plist, managed)
     if t == PLIST_UINT:
         return Integer_factory(c_plist, managed)
+    if t == PLIST_KEY:
+        return Key_factory(c_plist, managed)
     if t == PLIST_REAL:
         return Real_factory(c_plist, managed)
     if t == PLIST_STRING:
diff -Nru libplist-1.8/debian/changelog libplist-1.10/debian/changelog
--- libplist-1.8/debian/changelog	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/changelog	2013-04-29 13:26:27.000000000 +0200
@@ -1,3 +1,14 @@
+libplist (1.10-1) experimental; urgency=low
+
+  * [8e1c6b4] New upstream version 1.10
+  * [d7690ae] Adjust for renamed plutil (now plistutil).
+  * [1af6238] Install new include/plist/{Uid,Key}.h
+  * [05f2056] Use hardening flags
+  * [5bc34e6] Update debian/libplist1.symbols
+  * [f69caed] Add build-dep on dpkg-dev
+
+ -- Michael Wild <themiwi at users.sourceforge.net>  Mon, 29 Apr 2013 11:59:01 +0200
+
 libplist (1.8-2) experimental; urgency=low
 
   * debian/control:
diff -Nru libplist-1.8/debian/control libplist-1.10/debian/control
--- libplist-1.8/debian/control	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/control	2013-04-29 13:25:37.000000000 +0200
@@ -10,7 +10,8 @@
                cython,
                python-all-dev (>= 2.6.6-3~),
                doxygen,
-               chrpath
+               chrpath,
+               dpkg-dev (>= 1.16.1~)
 X-Python-Version: >= 2.5
 Homepage: http://www.libimobiledevice.org/
 Vcs-Git: git://git.debian.org/git/pkg-gtkpod/packages/libplist.git
diff -Nru libplist-1.8/debian/libplist++1.lintian-overrides libplist-1.10/debian/libplist++1.lintian-overrides
--- libplist-1.8/debian/libplist++1.lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/debian/libplist++1.lintian-overrides	2013-04-29 13:25:26.000000000 +0200
@@ -0,0 +1,2 @@
+# The hardening flags are set, this is a false positive
+libplist++1: hardening-no-fortify-functions usr/lib/libplist++.so.1.1.10
diff -Nru libplist-1.8/debian/libplist1.symbols libplist-1.10/debian/libplist1.symbols
--- libplist-1.8/debian/libplist1.symbols	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/libplist1.symbols	2013-04-29 13:25:37.000000000 +0200
@@ -59,6 +59,7 @@
  plist_get_parent at Base 0.13
  plist_get_real_val at Base 0.13
  plist_get_string_val at Base 0.13
+ plist_get_uid_val at Base 1.10
  plist_get_uint_val at Base 0.13
  plist_new_array at Base 0.13
  plist_new_bool at Base 0.16
@@ -67,6 +68,7 @@
  plist_new_dict at Base 0.13
  plist_new_real at Base 0.16
  plist_new_string at Base 0.16
+ plist_new_uid at Base 1.10
  plist_new_uint at Base 0.16
  plist_set_bool_val at Base 0.13
  plist_set_data_val at Base 0.13
@@ -75,6 +77,7 @@
  plist_set_real_val at Base 0.13
  plist_set_string_val at Base 0.13
  plist_set_type at Base 0.16
+ plist_set_uid_val at Base 1.10
  plist_set_uint_val at Base 0.13
  plist_to_bin at Base 0.13
  plist_to_xml at Base 0.13
diff -Nru libplist-1.8/debian/libplist++-dev.install libplist-1.10/debian/libplist++-dev.install
--- libplist-1.8/debian/libplist++-dev.install	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/libplist++-dev.install	2013-04-29 11:58:27.000000000 +0200
@@ -10,4 +10,6 @@
 usr/include/plist/Dictionary.h
 usr/include/plist/plist++.h
 usr/include/plist/Integer.h
+usr/include/plist/Uid.h
+usr/include/plist/Key.h
 usr/lib/pkgconfig/libplist++.pc
diff -Nru libplist-1.8/debian/libplist-utils.lintian-overrides libplist-1.10/debian/libplist-utils.lintian-overrides
--- libplist-1.8/debian/libplist-utils.lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/debian/libplist-utils.lintian-overrides	2013-04-29 13:23:58.000000000 +0200
@@ -0,0 +1,2 @@
+# The hardening flags are set, this is a false positive
+libplist-utils: hardening-no-fortify-functions usr/bin/plistutil
diff -Nru libplist-1.8/debian/libplist-utils.manpages libplist-1.10/debian/libplist-utils.manpages
--- libplist-1.8/debian/libplist-utils.manpages	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/libplist-utils.manpages	2013-04-29 11:57:39.000000000 +0200
@@ -1 +1 @@
-debian/plutil.1
+debian/plistutil.1
diff -Nru libplist-1.8/debian/patches/04-Add-DEB_EXE_COMPILE_FLAGS-to-build-system.patch libplist-1.10/debian/patches/04-Add-DEB_EXE_COMPILE_FLAGS-to-build-system.patch
--- libplist-1.8/debian/patches/04-Add-DEB_EXE_COMPILE_FLAGS-to-build-system.patch	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/debian/patches/04-Add-DEB_EXE_COMPILE_FLAGS-to-build-system.patch	2013-04-29 13:23:58.000000000 +0200
@@ -0,0 +1,29 @@
+From: Michael Wild <themiwi at users.sourceforge.net>
+Date: Mon, 29 Apr 2013 10:39:20 +0200
+Subject: Add DEB_EXE_COMPILE_FLAGS to build system
+
+This is to allow for the PIE flags being used on the executables.
+
+Signed-off-by: Michael Wild <themiwi at users.sourceforge.net>
+---
+ plistutil/CMakeLists.txt |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plistutil/CMakeLists.txt b/plistutil/CMakeLists.txt
+index 68382ee..2988c70 100644
+--- a/plistutil/CMakeLists.txt
++++ b/plistutil/CMakeLists.txt
+@@ -5,5 +5,13 @@ SET(plistutil_SRC
+ ADD_EXECUTABLE(plistutil ${plistutil_SRC})
+ TARGET_LINK_LIBRARIES(plistutil plist)
+ SET_TARGET_PROPERTIES( plistutil PROPERTIES VERSION ${PLISTUTIL_VERSION} )
++IF(DEB_EXE_COMPILE_FLAGS)
++	SET_TARGET_PROPERTIES(plistutil PROPERTIES COMPILE_FLAGS
++		"${DEB_EXE_COMPILE_FLAGS}")
++ENDIF()
++IF(DEB_EXE_LINK_FLAGS)
++	SET_TARGET_PROPERTIES(plistutil PROPERTIES LINK_FLAGS
++		"${DEB_EXE_LINK_FLAGS}")
++ENDIF()
+ 
+ INSTALL( TARGETS plistutil RUNTIME DESTINATION bin COMPONENT plistutil )
diff -Nru libplist-1.8/debian/patches/series libplist-1.10/debian/patches/series
--- libplist-1.8/debian/patches/series	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/patches/series	2013-04-29 13:23:58.000000000 +0200
@@ -1,2 +1,3 @@
 01-libs.private.patch
 03-remove-rpath.patch
+04-Add-DEB_EXE_COMPILE_FLAGS-to-build-system.patch
diff -Nru libplist-1.8/debian/plistutil.1 libplist-1.10/debian/plistutil.1
--- libplist-1.8/debian/plistutil.1	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/debian/plistutil.1	2013-04-29 11:57:39.000000000 +0200
@@ -0,0 +1,27 @@
+.TH PLISTUTIL 1 "October 31, 2009"
+.SH NAME
+plistutil \- A converter tool for binary or XML Apple property lists
+
+.SH SYNOPSIS
+.B plistutil
+\-i|\-\-infile in_file.plist \-o|\-\-outfile out_file.plist [\-\-debug]
+
+.SH OPTION
+.TP
+.B \-i or \-\-infile
+The file to read in.
+.TP
+.B \-o or \-\-outfile
+The file to convert to.
+.TP
+.B \-d, \-v or \-\-debug
+Provide extended debug information.
+
+.SH DESCRIPTION
+\fBplistutil\fP 
+
+.SH AUTHOR
+plistutil was written by Zach C.
+.PP
+This manual page was written by Julien Lavergne <julien.lavergne at gmail.com>,
+for the Debian project (but may be used by others).
diff -Nru libplist-1.8/debian/plutil.1 libplist-1.10/debian/plutil.1
--- libplist-1.8/debian/plutil.1	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/plutil.1	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-.TH PLUTIL 1 "October 31, 2009"
-.SH NAME
-plutil \- A converter tool for binary or XML Apple property lists
-
-.SH SYNOPSIS
-.B plutil
-\-i|\-\-infile in_file.plist \-o|\-\-outfile out_file.plist [\-\-debug]
-
-.SH OPTION
-.TP
-.B \-i or \-\-infile
-The file to read in.
-.TP
-.B \-o or \-\-outfile
-The file to convert to.
-.TP
-.B \-d, \-v or \-\-debug
-Provide extended debug information.
-
-.SH DESCRIPTION
-\fBplutil\fP 
-
-.SH AUTHOR
-plutil was written by Zach C..
-.PP
-This manual page was written by Julien Lavergne <julien.lavergne at gmail.com>,
-for the Debian project (but may be used by others).
diff -Nru libplist-1.8/debian/README.Debian libplist-1.10/debian/README.Debian
--- libplist-1.8/debian/README.Debian	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/debian/README.Debian	2013-04-27 14:15:44.000000000 +0200
@@ -0,0 +1,7 @@
+=== Supported arches ===
+
+libplist currently build on all Debian arches. However, the support on several
+arches is broken (testsuite failled).
+
+Current supported arches : amd64 i386 kfreebsd-amd64 kfreebsd-amd64
+(See also debian/rules)
diff -Nru libplist-1.8/debian/rules libplist-1.10/debian/rules
--- libplist-1.8/debian/rules	2012-07-20 22:33:18.000000000 +0200
+++ libplist-1.10/debian/rules	2013-04-29 13:23:58.000000000 +0200
@@ -1,22 +1,34 @@
 #!/usr/bin/make -f
-#DH_VERBOSE=1
+DH_VERBOSE=1
 
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-LDFLAGS += -Wl,--as-needed
+# work around the fact that CMake ignores CPPFLAGS.
+# see http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake.
+# compat=9 and dh(7) do this automagically on Debian sid, however Ubuntu still
+# needs this manual hack.
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+CFLAGS+=$(CPPFLAGS)
+CXXFLAGS+=$(CPPFLAGS)
+
+# hardening flags, remove PIE flags; we'll add them later
+include /usr/share/hardening-includes/hardening.make
+CFLAGS+=$(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(HARDENING_CFLAGS))
+CXXFLAGS+=$(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(HARDENING_CFLAGS))
+LDFLAGS+=$(filter-out $(HARDENING_DISABLE_PIE_LDFLAGS_FILTER),$(HARDENING_LDFLAGS))
+DEB_EXE_COMPILE_FLAGS:=$(filter $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(HARDENING_CFLAGS))
+DEB_EXE_LINK_FLAGS:=$(filter $(HARDENING_DISABLE_PIE_LDFLAGS_FILTER),$(HARDENING_LDFLAGS))
 
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-    CFLAGS += -O0
-else
-    CFLAGS += -O2
-endif
+LDFLAGS += -Wl,--as-needed
 
 PYVER=$(shell pyversions -vd)
 
 configure_flags += \
-			-DCMAKE_INSTALL_PREFIX="/usr" \
-			-DPython_ADDITIONAL_VERSIONS=$(PYVER)
+			-DPython_ADDITIONAL_VERSIONS=$(PYVER) \
+			-DDEB_EXE_COMPILE_FLAGS="$(DEB_EXE_COMPILE_FLAGS)" \
+			-DDEB_EXE_LINK_FLAGS="$(DEB_EXE_LINK_FLAGS)"
 
 %:
 	dh $@ --with python2
@@ -29,8 +41,8 @@
 	doxygen doxygen.cfg
 
 override_dh_install:
-	mv $(CURDIR)/debian/tmp/usr/bin/plutil-* \
-		$(CURDIR)/debian/tmp/usr/bin/plutil
+	mv $(CURDIR)/debian/tmp/usr/bin/plistutil-* \
+		$(CURDIR)/debian/tmp/usr/bin/plistutil
 
 	chrpath -d $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/plist.so
 
diff -Nru libplist-1.8/doxygen.cfg libplist-1.10/doxygen.cfg
--- libplist-1.8/doxygen.cfg	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/doxygen.cfg	2013-03-19 17:34:11.000000000 +0100
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.8
+PROJECT_NUMBER         = 1.10
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
diff -Nru libplist-1.8/include/CMakeLists.txt libplist-1.10/include/CMakeLists.txt
--- libplist-1.8/include/CMakeLists.txt	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/include/CMakeLists.txt	2013-03-19 17:34:11.000000000 +0100
@@ -10,6 +10,8 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/plist/Node.h
 	${CMAKE_CURRENT_SOURCE_DIR}/plist/Real.h
 	${CMAKE_CURRENT_SOURCE_DIR}/plist/String.h
+	${CMAKE_CURRENT_SOURCE_DIR}/plist/Key.h
+	${CMAKE_CURRENT_SOURCE_DIR}/plist/Uid.h
 	${CMAKE_CURRENT_SOURCE_DIR}/plist/Structure.h
   )
 
diff -Nru libplist-1.8/include/plist/Date.h libplist-1.10/include/plist/Date.h
--- libplist-1.8/include/plist/Date.h	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/include/plist/Date.h	2013-03-19 17:34:11.000000000 +0100
@@ -24,10 +24,7 @@
 
 #include <plist/Node.h>
 #include <ctime>
-
-#ifdef _WIN32
-#include <Winsock2.h>
-#endif
+#include <sys/time.h>
 
 namespace PList
 {
diff -Nru libplist-1.8/include/plist/Key.h libplist-1.10/include/plist/Key.h
--- libplist-1.8/include/plist/Key.h	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/include/plist/Key.h	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,49 @@
+/*
+ * Key.h
+ * Key node type for C++ binding
+ *
+ * Copyright (c) 2012 Nikias Bassen, All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef PLIST__KEY_H
+#define PLIST__KEY_H
+
+#include <plist/Node.h>
+#include <string>
+
+namespace PList
+{
+
+class Key : public Node
+{
+public :
+    Key(Node* parent = NULL);
+    Key(plist_t node, Node* parent = NULL);
+    Key(Key& s);
+    Key& operator=(Key& s);
+    Key(const std::string& s);
+    virtual ~Key();
+
+    Node* Clone();
+
+    void SetValue(const std::string& s);
+    std::string GetValue();
+};
+
+};
+
+#endif // PLIST__KEY_H
diff -Nru libplist-1.8/include/plist/plist.h libplist-1.10/include/plist/plist.h
--- libplist-1.8/include/plist/plist.h	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/include/plist/plist.h	2013-03-19 17:34:11.000000000 +0100
@@ -83,6 +83,7 @@
         PLIST_DATE,	/**< Date, scalar type */
         PLIST_DATA,	/**< Binary data, scalar type */
         PLIST_KEY,	/**< Key in dictionaries (ASCII String), scalar type */
+        PLIST_UID,      /**< Special type used for 'keyed encoding' */
         PLIST_NONE	/**< No type */
     } plist_type;
 
@@ -166,6 +167,15 @@
     PLIST_API plist_t plist_new_date(int32_t sec, int32_t usec);
 
     /**
+     * Create a new plist_t type #PLIST_UID
+     *
+     * @param val the unsigned integer value
+     * @return the created item
+     * @sa #plist_type
+     */
+    PLIST_API plist_t plist_new_uid(uint64_t val);
+
+    /**
      * Destruct a plist_t node and all its children recursively
      *
      * @param plist the plist to free
@@ -416,6 +426,15 @@
      */
     PLIST_API void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec);
 
+    /**
+     * Get the value of a #PLIST_UID node.
+     * This function does nothing if node is not of type #PLIST_UID
+     *
+     * @param node the node
+     * @param val a pointer to a uint64_t variable.
+     */
+    PLIST_API void plist_get_uid_val(plist_t node, uint64_t * val);
+
 
     /********************************************
      *                                          *
@@ -496,6 +515,15 @@
      */
     PLIST_API void plist_set_date_val(plist_t node, int32_t sec, int32_t usec);
 
+    /**
+     * Set the value of a node.
+     * Forces type of node to #PLIST_UID
+     *
+     * @param node the node
+     * @param val the unsigned integer value
+     */
+    PLIST_API void plist_set_uid_val(plist_t node, uint64_t val);
+
 
     /********************************************
      *                                          *
diff -Nru libplist-1.8/include/plist/plist++.h libplist-1.10/include/plist/plist++.h
--- libplist-1.8/include/plist/plist++.h	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/include/plist/plist++.h	2013-03-19 17:34:11.000000000 +0100
@@ -31,6 +31,8 @@
 #include "Integer.h"
 #include "Node.h"
 #include "Real.h"
+#include "Key.h"
+#include "Uid.h"
 #include "String.h"
 #include "Structure.h"
 
diff -Nru libplist-1.8/include/plist/Uid.h libplist-1.10/include/plist/Uid.h
--- libplist-1.8/include/plist/Uid.h	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/include/plist/Uid.h	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,48 @@
+/*
+ * Uid.h
+ * Uid node type for C++ binding
+ *
+ * Copyright (c) 2012 Nikias Bassen, All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef PLIST__UID_H
+#define PLIST__UID_H
+
+#include <plist/Node.h>
+
+namespace PList
+{
+
+class Uid : public Node
+{
+public :
+    Uid(Node* parent = NULL);
+    Uid(plist_t node, Node* parent = NULL);
+    Uid(Uid& i);
+    Uid& operator=(Uid& i);
+    Uid(uint64_t i);
+    virtual ~Uid();
+
+    Node* Clone();
+
+    void SetValue(uint64_t i);
+    uint64_t GetValue();
+};
+
+};
+
+#endif // PLIST__UID_H
diff -Nru libplist-1.8/libcnary/node.c libplist-1.10/libcnary/node.c
--- libplist-1.8/libcnary/node.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/libcnary/node.c	2013-03-19 17:34:11.000000000 +0100
@@ -95,16 +95,17 @@
 }
 
 int node_detach(node_t* parent, node_t* child) {
-	if (!parent || !child) return 0;
-	if (node_list_remove(parent->children, child) == 0) {
+	if (!parent || !child) return -1;
+	int index = node_list_remove(parent->children, child);
+	if (index >= 0) {
 		parent->count--;
 	}
-	return 0;
+	return index;
 }
 
 int node_insert(node_t* parent, unsigned int index, node_t* child)
 {
-	if (!parent || !child) return;
+	if (!parent || !child) return -1;
 	child->isLeaf = TRUE;
 	child->isRoot = FALSE;
 	child->parent = parent;
@@ -209,7 +210,7 @@
 node_t* node_copy_deep(node_t* node, copy_func_t copy_func)
 {
 	if (!node) return NULL;
-	void *data;
+	void *data = NULL;
 	if (copy_func) {
 		data = copy_func(node->data);
 	}
diff -Nru libplist-1.8/libcnary/node_list.c libplist-1.10/libcnary/node_list.c
--- libplist-1.8/libcnary/node_list.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/libcnary/node_list.c	2013-03-19 17:34:11.000000000 +0100
@@ -124,6 +124,7 @@
 	if (!list || !node) return -1;
 	if (list->count == 0) return -1;
 
+	int index = 0;
 	node_t* n;
 	for (n = list->begin; n; n = n->next) {
 		if (node == n) {
@@ -144,8 +145,9 @@
 				list->begin = newnode;
 			}
 			list->count--;
-			return 0;
+			return index;
 		}
+		index++;
 	}	
 	return -1;
 }
diff -Nru libplist-1.8/NEWS libplist-1.10/NEWS
--- libplist-1.8/NEWS	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/NEWS	2013-03-19 17:34:11.000000000 +0100
@@ -1,3 +1,29 @@
+Version 1.10
+~~~~~~~~~~~~
+
+- Changes:
+  * Renamed plutil to plistutil to not mask Apple's plutil
+  * Fixed cython bindings (broken in 1.9) 
+  * Added support for PLIST_UID node types to C++, cython, and swig bindings
+
+- Important Note:
+  * Support for swig python bindings will be dropped with future releases.
+    The bindings will be kept in the source tree for now, but we suggest
+    to update your python code to use the cython bindings instead.
+
+Version 1.9
+~~~~~~~~~~~
+
+- Changes:
+  * Add support for handling UID node types
+  * Fix crash when converting plists containing comments
+  * Fix Bug in plist_data_compare()
+  * Fix DST handling for PLIST_DATE
+  * Fix plist_dict_set_item() and plist_array_set_item()
+  * Fix cython String plist handling
+  * Fix invalid memory access in copy_plist_data()
+  * Fix several compiler warnings
+
 Version 1.8
 ~~~~~~~~~~~
 
diff -Nru libplist-1.8/plistutil/CMakeLists.txt libplist-1.10/plistutil/CMakeLists.txt
--- libplist-1.8/plistutil/CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/plistutil/CMakeLists.txt	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,9 @@
+
+SET(plistutil_SRC
+	plistutil.c)
+
+ADD_EXECUTABLE(plistutil ${plistutil_SRC})
+TARGET_LINK_LIBRARIES(plistutil plist)
+SET_TARGET_PROPERTIES( plistutil PROPERTIES VERSION ${PLISTUTIL_VERSION} )
+
+INSTALL( TARGETS plistutil RUNTIME DESTINATION bin COMPONENT plistutil )
diff -Nru libplist-1.8/plistutil/plistutil.c libplist-1.10/plistutil/plistutil.c
--- libplist-1.8/plistutil/plistutil.c	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/plistutil/plistutil.c	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,164 @@
+/*
+ * plistutil.c
+ * source for plist convertion tool
+ *
+ * Copyright (c) 2008 Zach C. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+
+#include "plist/plist.h"
+#include "plistutil.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#ifdef _MSC_VER
+#pragma warning(disable:4996)
+#endif
+
+
+int main(int argc, char *argv[])
+{
+    FILE *iplist = NULL;
+    plist_t root_node = NULL;
+    char *plist_out = NULL;
+    uint32_t size = 0;
+    int read_size = 0;
+    char *plist_entire = NULL;
+    struct stat *filestats = (struct stat *) malloc(sizeof(struct stat));
+    Options *options = parse_arguments(argc, argv);
+
+    if (!options)
+    {
+        print_usage();
+        free(filestats);
+        return 0;
+    }
+    //read input file
+    iplist = fopen(options->in_file, "rb");
+    if (!iplist)
+        return 1;
+    stat(options->in_file, filestats);
+    plist_entire = (char *) malloc(sizeof(char) * (filestats->st_size + 1));
+    read_size = fread(plist_entire, sizeof(char), filestats->st_size, iplist);
+    fclose(iplist);
+
+
+    //convert one format to another
+
+
+    if (memcmp(plist_entire, "bplist00", 8) == 0)
+    {
+        plist_from_bin(plist_entire, read_size, &root_node);
+        plist_to_xml(root_node, &plist_out, &size);
+    }
+    else
+    {
+        plist_from_xml(plist_entire, read_size, &root_node);
+        plist_to_bin(root_node, &plist_out, &size);
+    }
+    plist_free(root_node);
+    free(plist_entire);
+    free(filestats);
+
+    if (plist_out)
+    {
+        if (options->out_file != NULL)
+        {
+            FILE *oplist = fopen(options->out_file, "wb");
+            if (!oplist)
+                return 1;
+            fwrite(plist_out, size, sizeof(char), oplist);
+            fclose(oplist);
+        }
+        //if no output file specified, write to stdout
+        else
+            fwrite(plist_out, size, sizeof(char), stdout);
+
+        free(plist_out);
+    }
+    else
+        printf("ERROR\n");
+
+    free(options);
+    return 0;
+}
+
+Options *parse_arguments(int argc, char *argv[])
+{
+    int i = 0;
+
+    Options *options = (Options *) malloc(sizeof(Options));
+    memset(options, 0, sizeof(Options));
+
+    for (i = 1; i < argc; i++)
+    {
+        if (!strcmp(argv[i], "--infile") || !strcmp(argv[i], "-i"))
+        {
+            if ((i + 1) == argc)
+            {
+                free(options);
+                return NULL;
+            }
+            options->in_file = argv[i + 1];
+            i++;
+            continue;
+        }
+
+        if (!strcmp(argv[i], "--outfile") || !strcmp(argv[i], "-o"))
+        {
+            if ((i + 1) == argc)
+            {
+                free(options);
+                return NULL;
+            }
+            options->out_file = argv[i + 1];
+            i++;
+            continue;
+        }
+
+        if (!strcmp(argv[i], "--debug") || !strcmp(argv[i], "-d") || !strcmp(argv[i], "-v"))
+        {
+            options->debug = 1;
+        }
+
+        if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h"))
+        {
+            free(options);
+            return NULL;
+        }
+    }
+
+    if (!options->in_file /*|| !options->out_file */ )
+    {
+        free(options);
+        return NULL;
+    }
+
+    return options;
+}
+
+void print_usage()
+{
+    printf("Usage: plistutil -i|--infile in_file.plist -o|--outfile out_file.plist [--debug]\n");
+    printf("\n");
+    printf("\t-i or --infile: The file to read in.\n");
+    printf("\t-o or --outfile: The file to convert to.\n");
+    printf("\t-d, -v or --debug: Provide extended debug information.\n\n");
+}
diff -Nru libplist-1.8/plistutil/plistutil.h libplist-1.10/plistutil/plistutil.h
--- libplist-1.8/plistutil/plistutil.h	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/plistutil/plistutil.h	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,29 @@
+/*
+ * plistutil.h
+ * header for plist convertion tool
+ *
+ * Copyright (c) 2008 Zach C. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+typedef struct _options
+{
+    char *in_file, *out_file;
+    uint8_t debug, in_fmt, out_fmt;
+} Options;
+
+Options *parse_arguments(int argc, char *argv[]);
+void print_usage();
diff -Nru libplist-1.8/plutil/CMakeLists.txt libplist-1.10/plutil/CMakeLists.txt
--- libplist-1.8/plutil/CMakeLists.txt	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/plutil/CMakeLists.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-
-SET(plutil_SRC
-	plutil.c)
-
-ADD_EXECUTABLE(plutil ${plutil_SRC})
-TARGET_LINK_LIBRARIES(plutil plist)
-SET_TARGET_PROPERTIES( plutil PROPERTIES VERSION ${PLUTIL_VERSION} )
-
-INSTALL( TARGETS plutil RUNTIME DESTINATION bin COMPONENT plutil )
\ No newline at end of file
diff -Nru libplist-1.8/plutil/plutil.c libplist-1.10/plutil/plutil.c
--- libplist-1.8/plutil/plutil.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/plutil/plutil.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,164 +0,0 @@
-/*
- * plutil.C
- * source for plist convertion tool
- *
- * Copyright (c) 2008 Zach C. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-
-#include "plist/plist.h"
-#include "plutil.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#ifdef _MSC_VER
-#pragma warning(disable:4996)
-#endif
-
-
-int main(int argc, char *argv[])
-{
-    FILE *iplist = NULL;
-    plist_t root_node = NULL;
-    char *plist_out = NULL;
-    uint32_t size = 0;
-    int read_size = 0;
-    char *plist_entire = NULL;
-    struct stat *filestats = (struct stat *) malloc(sizeof(struct stat));
-    Options *options = parse_arguments(argc, argv);
-
-    if (!options)
-    {
-        print_usage();
-        free(filestats);
-        return 0;
-    }
-    //read input file
-    iplist = fopen(options->in_file, "rb");
-    if (!iplist)
-        return 1;
-    stat(options->in_file, filestats);
-    plist_entire = (char *) malloc(sizeof(char) * (filestats->st_size + 1));
-    read_size = fread(plist_entire, sizeof(char), filestats->st_size, iplist);
-    fclose(iplist);
-
-
-    //convert one format to another
-
-
-    if (memcmp(plist_entire, "bplist00", 8) == 0)
-    {
-        plist_from_bin(plist_entire, read_size, &root_node);
-        plist_to_xml(root_node, &plist_out, &size);
-    }
-    else
-    {
-        plist_from_xml(plist_entire, read_size, &root_node);
-        plist_to_bin(root_node, &plist_out, &size);
-    }
-    plist_free(root_node);
-    free(plist_entire);
-    free(filestats);
-
-    if (plist_out)
-    {
-        if (options->out_file != NULL)
-        {
-            FILE *oplist = fopen(options->out_file, "wb");
-            if (!oplist)
-                return 1;
-            fwrite(plist_out, size, sizeof(char), oplist);
-            fclose(oplist);
-        }
-        //if no output file specified, write to stdout
-        else
-            fwrite(plist_out, size, sizeof(char), stdout);
-
-        free(plist_out);
-    }
-    else
-        printf("ERROR\n");
-
-    free(options);
-    return 0;
-}
-
-Options *parse_arguments(int argc, char *argv[])
-{
-    int i = 0;
-
-    Options *options = (Options *) malloc(sizeof(Options));
-    memset(options, 0, sizeof(Options));
-
-    for (i = 1; i < argc; i++)
-    {
-        if (!strcmp(argv[i], "--infile") || !strcmp(argv[i], "-i"))
-        {
-            if ((i + 1) == argc)
-            {
-                free(options);
-                return NULL;
-            }
-            options->in_file = argv[i + 1];
-            i++;
-            continue;
-        }
-
-        if (!strcmp(argv[i], "--outfile") || !strcmp(argv[i], "-o"))
-        {
-            if ((i + 1) == argc)
-            {
-                free(options);
-                return NULL;
-            }
-            options->out_file = argv[i + 1];
-            i++;
-            continue;
-        }
-
-        if (!strcmp(argv[i], "--debug") || !strcmp(argv[i], "-d") || !strcmp(argv[i], "-v"))
-        {
-            options->debug = 1;
-        }
-
-        if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h"))
-        {
-            free(options);
-            return NULL;
-        }
-    }
-
-    if (!options->in_file /*|| !options->out_file */ )
-    {
-        free(options);
-        return NULL;
-    }
-
-    return options;
-}
-
-void print_usage()
-{
-    printf("Usage: plistutil -i|--infile in_file.plist -o|--outfile out_file.plist [--debug]\n");
-    printf("\n");
-    printf("\t-i or --infile: The file to read in.\n");
-    printf("\t-o or --outfile: The file to convert to.\n");
-    printf("\t-d, -v or --debug: Provide extended debug information.\n\n");
-}
diff -Nru libplist-1.8/plutil/plutil.h libplist-1.10/plutil/plutil.h
--- libplist-1.8/plutil/plutil.h	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/plutil/plutil.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-/*
- * plutil.h
- * header for plist convertion tool
- *
- * Copyright (c) 2008 Zach C. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-typedef struct _options
-{
-    char *in_file, *out_file;
-    uint8_t debug, in_fmt, out_fmt;
-} Options;
-
-Options *parse_arguments(int argc, char *argv[]);
-void print_usage();
diff -Nru libplist-1.8/src/base64.c libplist-1.10/src/base64.c
--- libplist-1.8/src/base64.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/base64.c	2013-03-19 17:34:11.000000000 +0100
@@ -104,9 +104,9 @@
 
 unsigned char *base64decode(const char *buf, size_t *size)
 {
-	if (!buf) return;
+	if (!buf) return NULL;
 	size_t len = strlen(buf);
-	if (len <= 0) return;
+	if (len <= 0) return NULL;
 	unsigned char *outbuf = (unsigned char*)malloc((len/4)*3+3);
 
 	unsigned char *line;
@@ -114,7 +114,7 @@
 
 	line = (unsigned char*)strtok((char*)buf, "\r\n\t ");
 	while (line) {
-		p+=base64decode_block(outbuf+p, line, strlen((char*)line));
+		p+=base64decode_block(outbuf+p, (const char*)line, strlen((char*)line));
 
 		// get next line of base64 encoded block
 		line = (unsigned char*)strtok(NULL, "\r\n\t ");
diff -Nru libplist-1.8/src/bplist.c libplist-1.10/src/bplist.c
--- libplist-1.8/src/bplist.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/bplist.c	2013-03-19 17:34:11.000000000 +0100
@@ -63,7 +63,8 @@
     BPLIST_DATA = 0x40,
     BPLIST_STRING = 0x50,
     BPLIST_UNICODE = 0x60,
-    BPLIST_UID = 0x70,
+    BPLIST_UNK_0x70 = 0x70,
+    BPLIST_UID = 0x80,
     BPLIST_ARRAY = 0xA0,
     BPLIST_SET = 0xC0,
     BPLIST_DICT = 0xD0,
@@ -375,6 +376,31 @@
     return node_create(NULL, data);
 }
 
+static plist_t parse_uid_node(char *bnode, uint8_t size, char **next_object)
+{
+    plist_data_t data = plist_new_plist_data();
+
+    size = 1 << size;			// make length less misleading
+    switch (size)
+    {
+    case sizeof(uint8_t):
+    case sizeof(uint16_t):
+    case sizeof(uint32_t):
+    case sizeof(uint64_t):
+        memcpy(&data->intval, bnode, size);
+        data->intval = UINT_TO_HOST(&data->intval, size);
+        break;
+    default:
+        free(data);
+        return NULL;
+    };
+
+    *next_object = bnode + size;
+    data->type = PLIST_UID;
+    data->length = sizeof(uint64_t);
+
+    return node_create(NULL, data);
+}
 
 
 static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_object)
@@ -464,7 +490,7 @@
         }
         return parse_unicode_node(object, size);
 
-    case BPLIST_UID:
+    case BPLIST_UNK_0x70:
     case BPLIST_ARRAY:
         if (0x0F == size)
         {
@@ -476,6 +502,9 @@
         }
         return parse_array_node(object, size, dict_size);
 
+    case BPLIST_UID:
+        return parse_uid_node(object, size, next_object);
+
     case BPLIST_SET:
     case BPLIST_DICT:
         if (0x0F == size)
@@ -521,12 +550,15 @@
         break;
     case PLIST_DATA:
     case PLIST_ARRAY:
-        dstdata->buff = (uint8_t *) malloc(sizeof(uint8_t *) * srcdata->length);
-        memcpy(dstdata->buff, srcdata->buff, sizeof(uint8_t *) * srcdata->length);
+        dstdata->buff = (uint8_t*) malloc(sizeof(uint8_t) * srcdata->length);
+        memcpy(dstdata->buff, srcdata->buff, sizeof(uint8_t) * srcdata->length);
         break;
     case PLIST_DICT:
-        dstdata->buff = (uint8_t *) malloc(sizeof(uint8_t *) * srcdata->length * 2);
-        memcpy(dstdata->buff, srcdata->buff, sizeof(uint8_t *) * srcdata->length * 2);
+        dstdata->buff = (uint8_t*) malloc(sizeof(uint8_t) * srcdata->length * 2);
+        memcpy(dstdata->buff, srcdata->buff, sizeof(uint8_t) * srcdata->length * 2);
+        break;
+    case PLIST_UID:
+        dstdata->intval = srcdata->intval;
         break;
     default:
         break;
@@ -672,6 +704,7 @@
     case PLIST_BOOLEAN:
     case PLIST_UINT:
     case PLIST_REAL:
+    case PLIST_UID:
         buff = (char *) &data->intval;	//works also for real as we use an union
         size = 8;
         break;
@@ -740,12 +773,6 @@
     return;
 }
 
-static int free_index(void* key, void* value, void* user_data)
-{
-    free((uint64_t *) value);
-    return TRUE;
-}
-
 #define Log2(x) (x == 8 ? 3 : (x == 4 ? 2 : (x == 2 ? 1 : 0)))
 
 static void write_int(bytearray_t * bplist, uint64_t val)
@@ -922,6 +949,26 @@
 
 }
 
+static void write_uid(bytearray_t * bplist, uint64_t val)
+{
+    uint64_t size = get_needed_bytes(val);
+    uint8_t *buff = NULL;
+    //do not write 3bytes int node
+    if (size == 3)
+        size++;
+
+#if PLIST_BYTE_ORDER == PLIST_BIG_ENDIAN
+    val = val << ((sizeof(uint64_t) - size) * 8);
+#endif
+
+    buff = (uint8_t *) malloc(sizeof(uint8_t) + size);
+    buff[0] = BPLIST_UID | Log2(size);
+    memcpy(buff + 1, &val, size);
+    byte_convert(buff + 1, size);
+    byte_array_append(bplist, buff, sizeof(uint8_t) + size);
+    free(buff);
+}
+
 static int is_ascii_string(char* s, int len)
 {
   int ret = 1, i = 0;
@@ -998,7 +1045,6 @@
     uint8_t trailer[BPLIST_TRL_SIZE];
     //for string
     long len = 0;
-    int type = 0;
     long items_read = 0;
     long items_written = 0;
     uint16_t *unicodestr = NULL;
@@ -1081,13 +1127,15 @@
         case PLIST_DATE:
             write_date(bplist_buff, data->timeval.tv_sec + (double) data->timeval.tv_usec / 1000000);
             break;
+        case PLIST_UID:
+            write_uid(bplist_buff, data->intval);
+            break;
         default:
             break;
         }
     }
 
     //free intermediate objects
-    //hash_table_foreach_remove(ref_table, free_index, NULL);
     ptr_array_free(objects);
     hash_table_destroy(ref_table);
 
diff -Nru libplist-1.8/src/CMakeLists.txt libplist-1.10/src/CMakeLists.txt
--- libplist-1.8/src/CMakeLists.txt	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/CMakeLists.txt	2013-03-19 17:34:11.000000000 +0100
@@ -19,6 +19,8 @@
 	String.cpp
 	Date.cpp
 	Data.cpp
+	Key.cpp
+	Uid.cpp
 	Structure.cpp
 	Array.cpp
 	Dictionary.cpp
diff -Nru libplist-1.8/src/common.h libplist-1.10/src/common.h
--- libplist-1.8/src/common.h	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/common.h	2013-03-19 17:34:11.000000000 +0100
@@ -4,6 +4,15 @@
 #define PLIST_LITTLE_ENDIAN 0
 #define PLIST_BIG_ENDIAN 1
 
+#ifndef PLIST_BYTE_ORDER
+#if __BIG_ENDIAN__ == 1
+#define PLIST_BYTE_ORDER PLIST_BIG_ENDIAN
+#endif
+#if __LITTLE_ENDIAN__ == 1
+#define PLIST_BYTE_ORDER PLIST_LITTLE_ENDIAN
+#endif
+#endif
+
 #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) && !defined(WIN32)
 # define _PLIST_INTERNAL      __attribute__((visibility("hidden")))
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
diff -Nru libplist-1.8/src/hashtable.c libplist-1.10/src/hashtable.c
--- libplist-1.8/src/hashtable.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/hashtable.c	2013-03-19 17:34:11.000000000 +0100
@@ -55,7 +55,6 @@
 void hash_table_insert(hashtable_t* ht, void *key, void *value)
 {
 	if (!ht || !key) return;
-	int i;
 
 	unsigned int hash = ht->hash_func(key);
 
diff -Nru libplist-1.8/src/Key.cpp libplist-1.10/src/Key.cpp
--- libplist-1.8/src/Key.cpp	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/src/Key.cpp	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,75 @@
+/*
+ * Key.cpp
+ *
+ * Copyright (c) 2012 Nikias Bassen, All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <stdlib.h>
+#include <plist/Key.h>
+
+namespace PList
+{
+
+Key::Key(Node* parent) : Node(PLIST_KEY, parent)
+{
+}
+
+Key::Key(plist_t node, Node* parent) : Node(node, parent)
+{
+}
+
+Key::Key(PList::Key& k) : Node(PLIST_UINT)
+{
+    plist_set_key_val(_node, k.GetValue().c_str());
+}
+
+Key& Key::operator=(PList::Key& k)
+{
+    plist_free(_node);
+    _node = plist_copy(k.GetPlist());
+    return *this;
+}
+
+Key::Key(const std::string& s) : Node(PLIST_STRING)
+{
+    plist_set_key_val(_node, s.c_str());
+}
+
+Key::~Key()
+{
+}
+
+Node* Key::Clone()
+{
+    return new Key(*this);
+}
+
+void Key::SetValue(const std::string& s)
+{
+    plist_set_key_val(_node, s.c_str());
+}
+
+std::string Key::GetValue()
+{
+    char* s = NULL;
+    plist_get_key_val(_node, &s);
+    std::string ret = s;
+    free(s);
+    return ret;
+}
+
+};
diff -Nru libplist-1.8/src/Node.cpp libplist-1.10/src/Node.cpp
--- libplist-1.8/src/Node.cpp	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/Node.cpp	2013-03-19 17:34:11.000000000 +0100
@@ -27,6 +27,8 @@
 #include <plist/Integer.h>
 #include <plist/Real.h>
 #include <plist/String.h>
+#include <plist/Key.h>
+#include <plist/Uid.h>
 #include <plist/Data.h>
 #include <plist/Date.h>
 
@@ -59,6 +61,13 @@
     case PLIST_STRING:
         _node = plist_new_string("");
         break;
+    case PLIST_KEY:
+        _node = plist_new_string("");
+        plist_set_key_val(_node, "");
+        break;
+    case PLIST_UID:
+	_node = plist_new_uid(0);
+	break;
     case PLIST_DATA:
         _node = plist_new_data(NULL,0);
         break;
@@ -71,7 +80,6 @@
     case PLIST_DICT:
         _node = plist_new_dict();
         break;
-    case PLIST_KEY:
     case PLIST_NONE:
     default:
         break;
@@ -130,6 +138,12 @@
         case PLIST_STRING:
             ret = new String(node, parent);
             break;
+        case PLIST_KEY:
+            ret = new Key(node, parent);
+            break;
+        case PLIST_UID:
+            ret = new Uid(node, parent);
+            break;
         case PLIST_DATE:
             ret = new Date(node, parent);
             break;
diff -Nru libplist-1.8/src/plist.c libplist-1.10/src/plist.c
--- libplist-1.8/src/plist.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/plist.c	2013-03-19 17:34:11.000000000 +0100
@@ -67,10 +67,10 @@
     }
 }
 
-static void plist_free_node(node_t* node)
+static int plist_free_node(node_t* node)
 {
     plist_data_t data = NULL;
-    node_detach(node->parent, node);
+    int index = node_detach(node->parent, node);
     data = plist_get_data(node);
     plist_free_data(data);
     node->data = NULL;
@@ -83,6 +83,8 @@
     node_iterator_destroy(ni);
 
     node_destroy(node);
+
+    return index;
 }
 
 plist_t plist_new_dict(void)
@@ -136,6 +138,15 @@
     return plist_new_node(data);
 }
 
+plist_t plist_new_uid(uint64_t val)
+{
+    plist_data_t data = plist_new_plist_data();
+    data->type = PLIST_UID;
+    data->intval = val;
+    data->length = sizeof(uint64_t);
+    return plist_new_node(data);
+}
+
 plist_t plist_new_real(double val)
 {
     plist_data_t data = plist_new_plist_data();
@@ -264,9 +275,12 @@
         plist_t old_item = plist_array_get_item(node, n);
         if (old_item)
         {
-            plist_free_node(old_item);
-            old_item = NULL;
-            plist_copy_node(item, &old_item);
+            int idx = plist_free_node(old_item);
+	    if (idx < 0) {
+		node_attach(node, item);
+	    } else {
+		node_insert(node, idx, item);
+	    }
         }
     }
     return;
@@ -393,12 +407,15 @@
 {
     if (node && PLIST_DICT == plist_get_node_type(node))
     {
-        plist_t old_item = plist_dict_get_item(node, key);
+        node_t* old_item = plist_dict_get_item(node, key);
         if (old_item)
         {
-            plist_free_node(old_item);
-            old_item = NULL;
-            plist_copy_node(item, &old_item);
+            int idx = plist_free_node(old_item);
+	    if (idx < 0) {
+		node_attach(node, item);
+	    } else {
+		node_insert(node, idx, item);
+	    }
         }
     }
     return;
@@ -482,6 +499,7 @@
         *((char *) value) = data->boolval;
         break;
     case PLIST_UINT:
+    case PLIST_UID:
         *((uint64_t *) value) = data->intval;
         break;
     case PLIST_REAL:
@@ -559,6 +577,15 @@
     assert(length == sizeof(uint64_t));
 }
 
+void plist_get_uid_val(plist_t node, uint64_t * val)
+{
+    plist_type type = plist_get_node_type(node);
+    uint64_t length = 0;
+    if (PLIST_UID == type)
+        plist_get_type_and_value(node, &type, (void *) val, &length);
+    assert(length == sizeof(uint64_t));
+}
+
 void plist_get_real_val(plist_t node, double *val)
 {
     plist_type type = plist_get_node_type(node);
@@ -609,6 +636,7 @@
     case PLIST_BOOLEAN:
     case PLIST_UINT:
     case PLIST_REAL:
+    case PLIST_UID:
         if (val_a->intval == val_b->intval)	//it is an union so this is sufficient
             return TRUE;
         else
@@ -622,6 +650,8 @@
             return FALSE;
 
     case PLIST_DATA:
+        if (val_a->length != val_b->length)
+            return FALSE;
         if (!memcmp(val_a->buff, val_b->buff, val_a->length))
             return TRUE;
         else
@@ -682,6 +712,7 @@
         data->boolval = *((char *) value);
         break;
     case PLIST_UINT:
+    case PLIST_UID:
         data->intval = *((uint64_t *) value);
         break;
     case PLIST_REAL:
@@ -720,6 +751,7 @@
             data->length = sizeof(uint8_t);
             break;
         case PLIST_UINT:
+        case PLIST_UID:
             data->length = sizeof(uint64_t);
             break;
         case PLIST_REAL:
@@ -755,6 +787,11 @@
     plist_set_element_val(node, PLIST_UINT, &val, sizeof(uint64_t));
 }
 
+void plist_set_uid_val(plist_t node, uint64_t val)
+{
+    plist_set_element_val(node, PLIST_UID, &val, sizeof(uint64_t));
+}
+
 void plist_set_real_val(plist_t node, double val)
 {
     plist_set_element_val(node, PLIST_REAL, &val, sizeof(double));
diff -Nru libplist-1.8/src/Uid.cpp libplist-1.10/src/Uid.cpp
--- libplist-1.8/src/Uid.cpp	1970-01-01 01:00:00.000000000 +0100
+++ libplist-1.10/src/Uid.cpp	2013-03-19 17:34:11.000000000 +0100
@@ -0,0 +1,73 @@
+/*
+ * Uid.cpp
+ *
+ * Copyright (c) 2012 Nikias Bassen, All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <stdlib.h>
+#include <plist/Uid.h>
+
+namespace PList
+{
+
+Uid::Uid(Node* parent) : Node(PLIST_UID, parent)
+{
+}
+
+Uid::Uid(plist_t node, Node* parent) : Node(node, parent)
+{
+}
+
+Uid::Uid(PList::Uid& i) : Node(PLIST_UID)
+{
+    plist_set_uid_val(_node, i.GetValue());
+}
+
+Uid& Uid::operator=(PList::Uid& i)
+{
+    plist_free(_node);
+    _node = plist_copy(i.GetPlist());
+    return *this;
+}
+
+Uid::Uid(uint64_t i) : Node(PLIST_UID)
+{
+    plist_set_uid_val(_node, i);
+}
+
+Uid::~Uid()
+{
+}
+
+Node* Uid::Clone()
+{
+    return new Uid(*this);
+}
+
+void Uid::SetValue(uint64_t i)
+{
+    plist_set_uid_val(_node, i);
+}
+
+uint64_t Uid::GetValue()
+{
+    uint64_t i = 0;
+    plist_get_uid_val(_node, &i);
+    return i;
+}
+
+};
diff -Nru libplist-1.8/src/xplist.c libplist-1.10/src/xplist.c
--- libplist-1.8/src/xplist.c	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/src/xplist.c	2013-03-19 17:34:11.000000000 +0100
@@ -126,6 +126,25 @@
     return plist_xml;
 }
 
+static struct node_t* new_key_node(const char* name)
+{
+    plist_data_t data = plist_new_plist_data();
+    data->type = PLIST_KEY;
+    int size = strlen(name);
+    data->strval = strdup(name);
+    data->length = size;
+    return node_create(NULL, data);
+}
+
+static struct node_t* new_uint_node(uint64_t uint)
+{
+    plist_data_t data = plist_new_plist_data();
+    data->type = PLIST_UINT;
+    data->intval = uint;
+    data->length = sizeof(uint64_t);
+    return node_create(NULL, data);
+}
+
 static void node_to_xml(node_t* node, void *xml_struct)
 {
     struct xml_node *xstruct = NULL;
@@ -133,6 +152,7 @@
 
     xmlNodePtr child_node = NULL;
     char isStruct = FALSE;
+    char isUIDNode = FALSE;
 
     const xmlChar *tag = NULL;
     char *val = NULL;
@@ -214,6 +234,15 @@
             }
         }
         break;
+    case PLIST_UID:
+        // special case for keyed encoding
+        tag = XPLIST_DICT;
+        isStruct = TRUE;
+        isUIDNode = TRUE;
+        node_data->type = PLIST_DICT;
+        node_attach(node, new_key_node("CF$UID"));
+        node_attach(node, new_uint_node(node_data->intval));
+        break;
     default:
         break;
     }
@@ -237,6 +266,15 @@
     if (node_data->type == PLIST_ARRAY || node_data->type == PLIST_DICT)
         xmlNodeAddContent(child_node, BAD_CAST("\n"));
 
+    //make sure we don't produce <data/> if it's empty
+    if ((node_data->type == PLIST_DATA) && !val) {
+        xmlNodeAddContent(child_node, BAD_CAST("\n"));
+        for (i = 0; i < xstruct->depth; i++)
+        {
+            xmlNodeAddContent(child_node, BAD_CAST("\t"));
+        }
+    }
+
     if (isStruct)
     {
         struct xml_node child = { child_node, xstruct->depth + 1 };
@@ -256,6 +294,17 @@
             xmlNodeAddContent(child_node, BAD_CAST("\t"));
         }
     }
+    if (isUIDNode)
+    {
+        unsigned int num = node_n_children(node);
+        unsigned int i;
+        for (i = num; i > 0; i--) {
+            node_t* ch = node_nth_child(node, i-1);
+            node_detach(node, ch);
+            node_destroy(ch);
+        }
+        node_data->type = PLIST_UID;
+    }
 
     return;
 }
@@ -272,6 +321,7 @@
     btime->tm_year-=1900;
     btime->tm_mon--;
 #endif
+    btime->tm_isdst=-1;
 }
 
 static void xml_to_node(xmlNodePtr xml_node, plist_t * plist_node)
@@ -295,6 +345,10 @@
         if (!node)
             break;
 
+        if (!xmlStrcmp(node->name, BAD_CAST("comment"))) {
+            continue;
+        }
+
         data = plist_new_plist_data();
         subnode = plist_new_node(data);
         if (*plist_node)
@@ -342,7 +396,7 @@
         {
             xmlChar *strval = xmlNodeGetContent(node);
             time_t time = 0;
-            if (strlen(strval) >= 11) {
+            if (strlen((const char*)strval) >= 11) {
                 struct tm btime;
                 parse_date((const char*)strval, &btime);
                 time = mktime(&btime);
@@ -406,6 +460,21 @@
         {
             data->type = PLIST_DICT;
             xml_to_node(node, &subnode);
+            if (plist_get_node_type(subnode) == PLIST_DICT) {
+                if (plist_dict_get_size(subnode) == 1) {
+                    plist_t uid = plist_dict_get_item(subnode, "CF$UID");
+                    if (uid) {
+                        uint64_t val = 0;
+                        plist_get_uint_val(uid, &val);
+                        plist_dict_remove_item(subnode, "CF$UID");
+                        plist_data_t nodedata = plist_get_data((node_t*)subnode);
+                        free(nodedata->buff);
+                        nodedata->type = PLIST_UID;
+                        nodedata->length = sizeof(uint64_t);
+                        nodedata->intval = val;
+                    } 
+                }
+            }
             continue;
         }
     }
diff -Nru libplist-1.8/swig/plist.i libplist-1.10/swig/plist.i
--- libplist-1.8/swig/plist.i	2012-01-11 15:29:30.000000000 +0100
+++ libplist-1.10/swig/plist.i	2013-03-19 17:34:11.000000000 +0100
@@ -91,6 +91,12 @@
 	    case PLIST_REAL:
 		*ptr = dynamic_cast<PList::Real *>(node);
 		return SWIGTYPE_p_PList__Real;
+	    case PLIST_KEY:
+		*ptr = dynamic_cast<PList::Key *>(node);
+		return SWIGTYPE_p_PList__Key;
+	    case PLIST_UID:
+		*ptr = dynamic_cast<PList::Uid *>(node);
+		return SWIGTYPE_p_PList__Uid;	
 	    case PLIST_STRING:
 		*ptr = dynamic_cast<PList::String *>(node);
 		return SWIGTYPE_p_PList__String;
@@ -141,6 +147,8 @@
 %ignore Boolean(plist_t);
 %ignore Integer(plist_t);
 %ignore Real(plist_t);
+%ignore Key(plist_t);
+%ignore Uid(plist_t);
 %ignore String(plist_t);
 %ignore Data(plist_t);
 %ignore Date(plist_t);
@@ -154,6 +162,8 @@
 %include <plist/Boolean.h>
 %include <plist/Integer.h>
 %include <plist/Real.h>
+%include <plist/Key.h>
+%include <plist/Uid.h>
 %include <plist/String.h>
 %include <plist/Data.h>
 %include <plist/Date.h>
@@ -171,6 +181,7 @@
 	PLIST_DATE,
 	PLIST_DATA,
 	PLIST_KEY,
+	PLIST_UID,
 	PLIST_NONE
 } plist_type;
 


More information about the Pkg-gtkpod-devel mailing list