OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libobjc/] [hash_compat.c] - Blame information for rev 20

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jlechner
/* Binary compatibility hash implementations for Objective C.
2
   Copyright (C) 2005 Free Software Foundation, Inc.
3
 
4
This file is part of GCC.
5
 
6
GCC is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
9
any later version.
10
 
11
GCC is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with GCC; see the file COPYING.  If not, write to
18
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19
Boston, MA 02110-1301, USA.  */
20
 
21
/* As a special exception, if you link this library with files
22
   compiled with GCC to produce an executable, this does not cause
23
   the resulting executable to be covered by the GNU General Public License.
24
   This exception does not however invalidate any other reasons why
25
   the executable file might be covered by the GNU General Public License.  */
26
 
27
#define OBJC_IGNORE_DEPRECATED_API 1
28
#include "objc/hash.h"
29
 
30
cache_ptr
31
hash_new (unsigned int size,
32
          hash_func_type hash_func,
33
          compare_func_type compare_func)
34
{
35
  return objc_hash_new(size, hash_func, compare_func);
36
}
37
 
38
void
39
hash_delete(cache_ptr cache)
40
{
41
  objc_hash_delete(cache);
42
}
43
 
44
void
45
hash_add (cache_ptr *cachep, const void *key, void *value)
46
{
47
  objc_hash_add(cachep, key, value);
48
}
49
 
50
void
51
hash_remove (cache_ptr cache, const void *key)
52
{
53
  objc_hash_remove (cache, key);
54
}
55
 
56
node_ptr
57
hash_next (cache_ptr cache, node_ptr node)
58
{
59
  return objc_hash_next (cache, node);
60
}
61
 
62
void *
63
hash_value_for_key (cache_ptr cache, const void *key)
64
{
65
  return objc_hash_value_for_key (cache, key);
66
}
67
 
68
BOOL
69
hash_is_key_in_hash (cache_ptr cache, const void *key)
70
{
71
  return objc_hash_is_key_in_hash (cache, key);
72
}
73
 
74
unsigned int
75
hash_ptr (cache_ptr cache, const void *key)
76
{
77
  return objc_hash_ptr (cache, key);
78
}
79
 
80
unsigned int
81
hash_string (cache_ptr cache, const void *key)
82
{
83
  return objc_hash_string (cache, key);
84
}
85
 
86
int
87
compare_ptrs (const void *k1, const void *k2)
88
{
89
  return objc_compare_ptrs (k1, k2);
90
}
91
 
92
int
93
compare_strings (const void *k1, const void *k2)
94
{
95
  return objc_compare_strings (k1, k2);
96
}
97
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.