少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
 * \file
 * Hash table for (object, property) pairs
 *
 * Author:
 *    Zoltan Varga (vargaz@gmail.com)
 *
 * (C) 2008 Novell, Inc
 */
 
/*
 * This is similar to the GLib hash table, but stores (object, property) pairs. It can
 * be used to store rarely used fields of runtime structures, decreasing memory usage.
 * The memory required to store one property is the size of one hash node, about 3
 * pointers.
 */
 
#ifndef _MONO_PROPERTY_HASH_H_
#define _MONO_PROPERTY_HASH_H_
 
#include <glib.h>
#include <mono/utils/mono-publib.h>
 
G_BEGIN_DECLS
 
typedef struct _MonoPropertyHash MonoPropertyHash;
 
MONO_API MonoPropertyHash* mono_property_hash_new (void);
 
MONO_API void mono_property_hash_destroy (MonoPropertyHash *hash);
 
MONO_API void mono_property_hash_insert (MonoPropertyHash *hash, gpointer object, guint32 property,
                                gpointer value);
 
/* Remove all properties of OBJECT */
MONO_API void mono_property_hash_remove_object (MonoPropertyHash *hash, gpointer object);
 
MONO_API gpointer mono_property_hash_lookup (MonoPropertyHash *hash, gpointer object, guint32 property);
 
G_END_DECLS
 
#endif