1 /* functions.c generated by valac 0.18.0, the Vala compiler
2 * generated from functions.vala, do not modify */
6 * Copyright (C) 2009 Didier Villevalois, Maciej Piechotka
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * Didier 'Ptitjes' Villevalois <ptitjes@free.fr>
24 * Maciej Piechotka <uzytkownik2@gmail.com>
28 #include <glib-object.h>
33 #define GEE_TYPE_HASHABLE (gee_hashable_get_type ())
34 #define GEE_HASHABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_HASHABLE, GeeHashable))
35 #define GEE_IS_HASHABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_HASHABLE))
36 #define GEE_HASHABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_HASHABLE, GeeHashableIface))
38 typedef struct _GeeHashable GeeHashable;
39 typedef struct _GeeHashableIface GeeHashableIface;
41 #define GEE_TYPE_COMPARABLE (gee_comparable_get_type ())
42 #define GEE_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_COMPARABLE, GeeComparable))
43 #define GEE_IS_COMPARABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_COMPARABLE))
44 #define GEE_COMPARABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_COMPARABLE, GeeComparableIface))
46 typedef struct _GeeComparable GeeComparable;
47 typedef struct _GeeComparableIface GeeComparableIface;
49 typedef gboolean (*GeeEqualDataFunc) (gconstpointer a, gconstpointer b, void* user_data);
50 struct _GeeHashableIface {
51 GTypeInterface parent_iface;
52 guint (*hash) (GeeHashable* self);
53 gboolean (*equal_to) (GeeHashable* self, gconstpointer object);
56 struct _GeeComparableIface {
57 GTypeInterface parent_iface;
58 gint (*compare_to) (GeeComparable* self, gconstpointer object);
61 typedef guint (*GeeHashDataFunc) (gconstpointer v, void* user_data);
64 GeeEqualDataFunc gee_functions_get_equal_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify);
65 static gboolean ___lambda21_ (gconstpointer a, gconstpointer b);
66 static gboolean ____lambda21__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
67 GType gee_hashable_get_type (void) G_GNUC_CONST;
68 static gboolean ____lambda22_ (gconstpointer a, gconstpointer b);
69 gboolean gee_hashable_equal_to (GeeHashable* self, gconstpointer object);
70 static gboolean _____lambda22__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
71 GType gee_comparable_get_type (void) G_GNUC_CONST;
72 static gboolean _____lambda23_ (gconstpointer a, gconstpointer b);
73 gint gee_comparable_compare_to (GeeComparable* self, gconstpointer object);
74 static gboolean ______lambda23__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
75 static gboolean _____lambda24_ (gconstpointer a, gconstpointer b);
76 static gboolean ______lambda24__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
77 GeeHashDataFunc gee_functions_get_hash_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify);
78 static guint ___lambda18_ (gconstpointer a);
79 static guint ____lambda18__gee_hash_data_func (gconstpointer v, gpointer self);
80 static guint ____lambda19_ (gconstpointer a);
81 guint gee_hashable_hash (GeeHashable* self);
82 static guint _____lambda19__gee_hash_data_func (gconstpointer v, gpointer self);
83 static guint ____lambda20_ (gconstpointer a);
84 static guint _____lambda20__gee_hash_data_func (gconstpointer v, gpointer self);
85 GCompareDataFunc gee_functions_get_compare_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify);
86 static gint ___lambda25_ (gconstpointer a, gconstpointer b);
87 static gint ____lambda25__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
88 static gint ____lambda26_ (gconstpointer a, gconstpointer b);
89 static gint _____lambda26__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
90 static gint ____lambda27_ (gconstpointer _val1, gconstpointer _val2);
91 static gint _____lambda27__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
95 * Get a equality testing function for a given type.
97 * @param t the type which to get an equality testing function for.
99 * @return the equality testing function corresponding to the given type.
101 static gboolean ___lambda21_ (gconstpointer a, gconstpointer b) {
102 gboolean result = FALSE;
103 gconstpointer _tmp0_;
104 gconstpointer _tmp1_;
107 if (_tmp0_ == _tmp1_) {
111 gboolean _tmp2_ = FALSE;
112 gconstpointer _tmp3_;
115 if (_tmp3_ == NULL) {
118 gconstpointer _tmp4_;
120 _tmp2_ = _tmp4_ == NULL;
128 gconstpointer _tmp7_;
129 gconstpointer _tmp8_;
130 gboolean _tmp9_ = FALSE;
131 _tmp6_ = g_str_equal;
134 _tmp9_ = _tmp6_ ((const gchar*) _tmp7_, (const gchar*) _tmp8_);
142 static gboolean ____lambda21__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
144 result = ___lambda21_ (a, b);
149 static gboolean ____lambda22_ (gconstpointer a, gconstpointer b) {
150 gboolean result = FALSE;
151 gconstpointer _tmp0_;
152 gconstpointer _tmp1_;
155 if (_tmp0_ == _tmp1_) {
159 gboolean _tmp2_ = FALSE;
160 gconstpointer _tmp3_;
163 if (_tmp3_ == NULL) {
166 gconstpointer _tmp4_;
168 _tmp2_ = _tmp4_ == NULL;
175 gconstpointer _tmp6_;
176 gconstpointer _tmp7_;
177 gboolean _tmp8_ = FALSE;
180 _tmp8_ = gee_hashable_equal_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_HASHABLE, GeeHashable), G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_HASHABLE, GeeHashable));
188 static gboolean _____lambda22__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
190 result = ____lambda22_ (a, b);
195 static gboolean _____lambda23_ (gconstpointer a, gconstpointer b) {
196 gboolean result = FALSE;
197 gconstpointer _tmp0_;
198 gconstpointer _tmp1_;
201 if (_tmp0_ == _tmp1_) {
205 gboolean _tmp2_ = FALSE;
206 gconstpointer _tmp3_;
209 if (_tmp3_ == NULL) {
212 gconstpointer _tmp4_;
214 _tmp2_ = _tmp4_ == NULL;
221 gconstpointer _tmp6_;
222 gconstpointer _tmp7_;
226 _tmp8_ = gee_comparable_compare_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COMPARABLE, GeeComparable), G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COMPARABLE, GeeComparable));
227 result = _tmp8_ == 0;
234 static gboolean ______lambda23__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
236 result = _____lambda23_ (a, b);
241 static gboolean _____lambda24_ (gconstpointer a, gconstpointer b) {
242 gboolean result = FALSE;
244 gconstpointer _tmp1_;
245 gconstpointer _tmp2_;
246 gboolean _tmp3_ = FALSE;
247 _tmp0_ = g_direct_equal;
250 _tmp3_ = _tmp0_ (_tmp1_, _tmp2_);
256 static gboolean ______lambda24__gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) {
258 result = _____lambda24_ (a, b);
263 GeeEqualDataFunc gee_functions_get_equal_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify) {
264 GeeEqualDataFunc result = NULL;
267 if (_tmp0_ == G_TYPE_STRING) {
268 GeeEqualDataFunc _tmp1_;
270 GDestroyNotify _tmp1__target_destroy_notify;
271 _tmp1_ = ____lambda21__gee_equal_data_func;
272 _tmp1__target = NULL;
273 _tmp1__target_destroy_notify = NULL;
274 *result_target = _tmp1__target;
275 *result_target_destroy_notify = _tmp1__target_destroy_notify;
280 gboolean _tmp3_ = FALSE;
282 _tmp3_ = g_type_is_a (_tmp2_, GEE_TYPE_HASHABLE);
284 GeeEqualDataFunc _tmp4_;
286 GDestroyNotify _tmp4__target_destroy_notify;
287 _tmp4_ = _____lambda22__gee_equal_data_func;
288 _tmp4__target = NULL;
289 _tmp4__target_destroy_notify = NULL;
290 *result_target = _tmp4__target;
291 *result_target_destroy_notify = _tmp4__target_destroy_notify;
296 gboolean _tmp6_ = FALSE;
298 _tmp6_ = g_type_is_a (_tmp5_, GEE_TYPE_COMPARABLE);
300 GeeEqualDataFunc _tmp7_;
302 GDestroyNotify _tmp7__target_destroy_notify;
303 _tmp7_ = ______lambda23__gee_equal_data_func;
304 _tmp7__target = NULL;
305 _tmp7__target_destroy_notify = NULL;
306 *result_target = _tmp7__target;
307 *result_target_destroy_notify = _tmp7__target_destroy_notify;
311 GeeEqualDataFunc _tmp8_;
313 GDestroyNotify _tmp8__target_destroy_notify;
314 _tmp8_ = ______lambda24__gee_equal_data_func;
315 _tmp8__target = NULL;
316 _tmp8__target_destroy_notify = NULL;
317 *result_target = _tmp8__target;
318 *result_target_destroy_notify = _tmp8__target_destroy_notify;
328 * Get a hash function for a given type.
330 * @param t the type which to get the hash function for.
332 * @return the hash function corresponding to the given type.
334 static guint ___lambda18_ (gconstpointer a) {
336 gconstpointer _tmp0_;
338 if (_tmp0_ == NULL) {
339 result = (guint) 0xdeadbeefLL;
343 gconstpointer _tmp2_;
347 _tmp3_ = _tmp1_ ((const gchar*) _tmp2_);
354 static guint ____lambda18__gee_hash_data_func (gconstpointer v, gpointer self) {
356 result = ___lambda18_ (v);
361 static guint ____lambda19_ (gconstpointer a) {
363 gconstpointer _tmp0_;
365 if (_tmp0_ == NULL) {
366 result = (guint) 0xdeadbeefLL;
369 gconstpointer _tmp1_;
372 _tmp2_ = gee_hashable_hash (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_HASHABLE, GeeHashable));
379 static guint _____lambda19__gee_hash_data_func (gconstpointer v, gpointer self) {
381 result = ____lambda19_ (v);
386 static guint ____lambda20_ (gconstpointer a) {
389 gconstpointer _tmp1_;
391 _tmp0_ = g_direct_hash;
393 _tmp2_ = _tmp0_ (_tmp1_);
399 static guint _____lambda20__gee_hash_data_func (gconstpointer v, gpointer self) {
401 result = ____lambda20_ (v);
406 GeeHashDataFunc gee_functions_get_hash_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify) {
407 GeeHashDataFunc result = NULL;
410 if (_tmp0_ == G_TYPE_STRING) {
411 GeeHashDataFunc _tmp1_;
413 GDestroyNotify _tmp1__target_destroy_notify;
414 _tmp1_ = ____lambda18__gee_hash_data_func;
415 _tmp1__target = NULL;
416 _tmp1__target_destroy_notify = NULL;
417 *result_target = _tmp1__target;
418 *result_target_destroy_notify = _tmp1__target_destroy_notify;
423 gboolean _tmp3_ = FALSE;
425 _tmp3_ = g_type_is_a (_tmp2_, GEE_TYPE_HASHABLE);
427 GeeHashDataFunc _tmp4_;
429 GDestroyNotify _tmp4__target_destroy_notify;
430 _tmp4_ = _____lambda19__gee_hash_data_func;
431 _tmp4__target = NULL;
432 _tmp4__target_destroy_notify = NULL;
433 *result_target = _tmp4__target;
434 *result_target_destroy_notify = _tmp4__target_destroy_notify;
438 GeeHashDataFunc _tmp5_;
440 GDestroyNotify _tmp5__target_destroy_notify;
441 _tmp5_ = _____lambda20__gee_hash_data_func;
442 _tmp5__target = NULL;
443 _tmp5__target_destroy_notify = NULL;
444 *result_target = _tmp5__target;
445 *result_target_destroy_notify = _tmp5__target_destroy_notify;
454 * Get a comparator function for a given type.
456 * @param t the type which to get a comparator function for.
458 * @return the comparator function corresponding to the given type.
460 static gint ___lambda25_ (gconstpointer a, gconstpointer b) {
462 gconstpointer _tmp0_;
463 gconstpointer _tmp1_;
466 if (_tmp0_ == _tmp1_) {
470 gconstpointer _tmp2_;
472 if (_tmp2_ == NULL) {
476 gconstpointer _tmp3_;
478 if (_tmp3_ == NULL) {
483 gconstpointer _tmp5_;
484 gconstpointer _tmp6_;
489 _tmp7_ = _tmp4_ ((const gchar*) _tmp5_, (const gchar*) _tmp6_);
498 static gint ____lambda25__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
500 result = ___lambda25_ (a, b);
505 static gint ____lambda26_ (gconstpointer a, gconstpointer b) {
507 gconstpointer _tmp0_;
508 gconstpointer _tmp1_;
511 if (_tmp0_ == _tmp1_) {
515 gconstpointer _tmp2_;
517 if (_tmp2_ == NULL) {
521 gconstpointer _tmp3_;
523 if (_tmp3_ == NULL) {
527 gconstpointer _tmp4_;
528 gconstpointer _tmp5_;
532 _tmp6_ = gee_comparable_compare_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COMPARABLE, GeeComparable), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COMPARABLE, GeeComparable));
541 static gint _____lambda26__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
543 result = ____lambda26_ (a, b);
548 static gint ____lambda27_ (gconstpointer _val1, gconstpointer _val2) {
550 gconstpointer _tmp0_;
552 gconstpointer _tmp1_;
557 val1 = (glong) _tmp0_;
559 val2 = (glong) _tmp1_;
562 if (_tmp2_ > _tmp3_) {
570 if (_tmp4_ == _tmp5_) {
581 static gint _____lambda27__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
583 result = ____lambda27_ (a, b);
588 GCompareDataFunc gee_functions_get_compare_func_for (GType t, void** result_target, GDestroyNotify* result_target_destroy_notify) {
589 GCompareDataFunc result = NULL;
592 if (_tmp0_ == G_TYPE_STRING) {
593 GCompareDataFunc _tmp1_;
595 GDestroyNotify _tmp1__target_destroy_notify;
596 _tmp1_ = ____lambda25__gcompare_data_func;
597 _tmp1__target = NULL;
598 _tmp1__target_destroy_notify = NULL;
599 *result_target = _tmp1__target;
600 *result_target_destroy_notify = _tmp1__target_destroy_notify;
605 gboolean _tmp3_ = FALSE;
607 _tmp3_ = g_type_is_a (_tmp2_, GEE_TYPE_COMPARABLE);
609 GCompareDataFunc _tmp4_;
611 GDestroyNotify _tmp4__target_destroy_notify;
612 _tmp4_ = _____lambda26__gcompare_data_func;
613 _tmp4__target = NULL;
614 _tmp4__target_destroy_notify = NULL;
615 *result_target = _tmp4__target;
616 *result_target_destroy_notify = _tmp4__target_destroy_notify;
620 GCompareDataFunc _tmp5_;
622 GDestroyNotify _tmp5__target_destroy_notify;
623 _tmp5_ = _____lambda27__gcompare_data_func;
624 _tmp5__target = NULL;
625 _tmp5__target_destroy_notify = NULL;
626 *result_target = _tmp5__target;
627 *result_target_destroy_notify = _tmp5__target_destroy_notify;