Skip to content
This repository
Browse code

removed unused comparison functions

  • Loading branch information...
commit 77f8586c0b6096760ee554bc9b338fc8c9f2227e 1 parent 353b6ac
Andy Lester authored October 11, 2011

Showing 1 changed file with 0 additions and 95 deletions. Show diff stats Hide diff stats

  1. 95  src/hash.c
95  src/hash.c
@@ -62,22 +62,6 @@ static int hash_compare(PARROT_INTERP,
62 62
 PARROT_WARN_UNUSED_RESULT
63 63
 PARROT_PURE_FUNCTION
64 64
 PARROT_INLINE
65  
-static int hash_compare_cstring(PARROT_INTERP,
66  
-    ARGIN(const char *a),
67  
-    ARGIN(const char *b))
68  
-        __attribute__nonnull__(2)
69  
-        __attribute__nonnull__(3);
70  
-
71  
-PARROT_WARN_UNUSED_RESULT
72  
-PARROT_PURE_FUNCTION
73  
-PARROT_INLINE
74  
-static int hash_compare_int(PARROT_INTERP,
75  
-    ARGIN_NULLOK(const void *a),
76  
-    ARGIN_NULLOK(const void *b));
77  
-
78  
-PARROT_WARN_UNUSED_RESULT
79  
-PARROT_PURE_FUNCTION
80  
-PARROT_INLINE
81 65
 static int hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
82 66
         __attribute__nonnull__(1)
83 67
         __attribute__nonnull__(2)
@@ -86,13 +70,6 @@ static int hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
86 70
 PARROT_WARN_UNUSED_RESULT
87 71
 PARROT_PURE_FUNCTION
88 72
 PARROT_INLINE
89  
-static int hash_compare_pointer(PARROT_INTERP,
90  
-    ARGIN_NULLOK(const void *a),
91  
-    ARGIN_NULLOK(const void *b));
92  
-
93  
-PARROT_WARN_UNUSED_RESULT
94  
-PARROT_PURE_FUNCTION
95  
-PARROT_INLINE
96 73
 static int hash_compare_string(PARROT_INTERP,
97 74
     ARGIN(const void *search_key),
98 75
     ARGIN(const void *bucket_key))
@@ -165,15 +142,10 @@ static void parrot_mark_hash_values(PARROT_INTERP, ARGIN(Hash *hash))
165 142
 #define ASSERT_ARGS_hash_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
166 143
        PARROT_ASSERT_ARG(interp) \
167 144
     , PARROT_ASSERT_ARG(hash))
168  
-#define ASSERT_ARGS_hash_compare_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
169  
-       PARROT_ASSERT_ARG(a) \
170  
-    , PARROT_ASSERT_ARG(b))
171  
-#define ASSERT_ARGS_hash_compare_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
172 145
 #define ASSERT_ARGS_hash_compare_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
173 146
        PARROT_ASSERT_ARG(interp) \
174 147
     , PARROT_ASSERT_ARG(a) \
175 148
     , PARROT_ASSERT_ARG(b))
176  
-#define ASSERT_ARGS_hash_compare_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
177 149
 #define ASSERT_ARGS_hash_compare_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
178 150
        PARROT_ASSERT_ARG(interp) \
179 151
     , PARROT_ASSERT_ARG(search_key) \
@@ -336,28 +308,6 @@ hash_compare_string_enc(ARGIN(const void *search_key), ARGIN(const void *bucket_
336 308
 
337 309
 /*
338 310
 
339  
-=item C<static int hash_compare_pointer(PARROT_INTERP, const void *a, const void
340  
-*b)>
341  
-
342  
-Compares the two pointers, returning 0 if they are identical
343  
-
344  
-=cut
345  
-
346  
-*/
347  
-
348  
-PARROT_WARN_UNUSED_RESULT
349  
-PARROT_PURE_FUNCTION
350  
-PARROT_INLINE
351  
-static int
352  
-hash_compare_pointer(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b))
353  
-{
354  
-    ASSERT_ARGS(hash_compare_pointer)
355  
-    return a != b;
356  
-}
357  
-
358  
-
359  
-/*
360  
-
361 311
 =item C<static size_t key_hash_cstring(PARROT_INTERP, const void *value, size_t
362 312
 seed)>
363 313
 
@@ -391,29 +341,6 @@ key_hash_cstring(SHIM_INTERP, ARGIN(const void *value), size_t seed)
391 341
 
392 342
 /*
393 343
 
394  
-=item C<static int hash_compare_cstring(PARROT_INTERP, const char *a, const char
395  
-*b)>
396  
-
397  
-Compares two C strings for equality, returning -1, 0, and 1 if the first string
398  
-is less than, equal to, or greater than the second, respectively.
399  
-
400  
-=cut
401  
-
402  
-*/
403  
-
404  
-PARROT_WARN_UNUSED_RESULT
405  
-PARROT_PURE_FUNCTION
406  
-PARROT_INLINE
407  
-static int
408  
-hash_compare_cstring(SHIM_INTERP, ARGIN(const char *a), ARGIN(const char *b))
409  
-{
410  
-    ASSERT_ARGS(hash_compare_cstring)
411  
-    return strcmp(a, b);
412  
-}
413  
-
414  
-
415  
-/*
416  
-
417 344
 =item C<static int hash_compare_pmc(PARROT_INTERP, PMC *a, PMC *b)>
418 345
 
419 346
 Compares two PMC for equality, returning 0 if the first is equal to second.
@@ -442,28 +369,6 @@ hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
442 369
     return !VTABLE_is_equal(interp, a, b);
443 370
 }
444 371
 
445  
-/*
446  
-
447  
-=item C<static int hash_compare_int(PARROT_INTERP, const void *a, const void
448  
-*b)>
449  
-
450  
-Compares two integers for equality, returning -1, 0, and 1 if the first is less
451  
-than, equal to, or greater than the second, respectively.  Uses void pointers
452  
-to store the integers, sadly.
453  
-
454  
-=cut
455  
-
456  
-*/
457  
-
458  
-PARROT_WARN_UNUSED_RESULT
459  
-PARROT_PURE_FUNCTION
460  
-PARROT_INLINE
461  
-static int
462  
-hash_compare_int(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b))
463  
-{
464  
-    ASSERT_ARGS(hash_compare_int)
465  
-    return a != b;
466  
-}
467 372
 
468 373
 /*
469 374
 

0 notes on commit 77f8586

Please sign in to comment.
Something went wrong with that request. Please try again.