]> saetta.ns0.it Git - libzakutils/commitdiff
Added boxed type in ::ghashtable_get_gdatetime.
authorAndrea Zagli <azagli@libero.it>
Mon, 30 Jan 2017 17:15:46 +0000 (18:15 +0100)
committerAndrea Zagli <azagli@libero.it>
Mon, 30 Jan 2017 17:15:46 +0000 (18:15 +0100)
src/generic.c

index 662468a8aae72435d4a1ec2044bbd9ba3c35e321..95b56371d1beed1b9031849a23c8fdc1b2a524c8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -817,6 +817,10 @@ GDateTime
                                                {
                                                        ret = g_date_time_ref ((GDateTime *)g_value_get_pointer (gv));
                                                }
+                                       else if (G_VALUE_HOLDS (gv, G_TYPE_DATE_TIME))
+                                               {
+                                                       ret = g_date_time_ref ((GDateTime *)g_value_get_boxed (gv));
+                                               }
                                        else
                                                {
                                                        ret = NULL;