summaryrefslogtreecommitdiffhomepage
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/object.c b/object.c
index c0a5227..df81fda 100644
--- a/object.c
+++ b/object.c
@@ -357,6 +357,13 @@ static uc_ressource_types res_types;
uc_ressource_type *
uc_ressource_type_add(const char *name, uc_prototype *proto, void (*freefn)(void *))
{
+ uc_ressource_type *existing;
+
+ existing = uc_ressource_type_lookup(name);
+
+ if (existing)
+ return existing;
+
uc_vector_grow(&res_types);
res_types.entries[res_types.count].name = name;