CONCORD_DS concord_current_env = NULL;
+int (*COS_Object_retain_function_table
+ [COS_OBJECT_TYPE_MAX - COS_Object_Type_char])
+ (COS_Object)
+ = { cos_retain_string,
+ cos_retain_symbol,
+ cos_retain_cons,
+ cos_retain_container,
+ cos_retain_sexp,
+ cos_retain_binary,
+ cos_retain_ds,
+ cos_retain_genre,
+ cos_retain_feature,
+ cos_retain_index,
+ cos_retain_db_object
+};
+
int (*COS_Object_release_function_table
[COS_OBJECT_TYPE_MAX - COS_Object_Type_char])
(COS_Object)
cos_retain_object (COS_Object obj)
{
if (COS_OBJECT_P (obj))
- obj->header.reference_count++;
+ {
+ obj->header.reference_count++;
+ (*COS_Object_retain_function_table
+ [((COS_Object)obj)->header.type
+ - COS_FAT_OBJECT_TYPE_MIN])(obj);
+ }
return obj;
}
}
int
+cos_retain_string (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_string (COS_Object obj)
{
if (obj == NULL)
}
int
+cos_retain_cons (COS_Object obj)
+{
+ cos_retain_object (COS_CAR (obj));
+ cos_retain_object (COS_CDR (obj));
+ return 0;
+}
+
+int
cos_release_cons (COS_Object obj)
{
if (obj == NULL)
int
+cos_retain_container (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_container (COS_Object obj)
{
return 0;
int
+cos_retain_sexp (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_sexp (COS_Object obj)
{
return 0;
int
+cos_retain_binary (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_binary (COS_Object obj)
{
return 0;
}
int
+cos_retain_ds (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_ds (COS_Object obj)
{
return concord_close_ds ((COS_DS)obj);
}
int
+cos_retain_genre (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_genre (COS_Object obj)
{
return concord_close_genre ((COS_Genre)obj);
}
int
+cos_retain_feature (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_feature (COS_Object obj)
{
return concord_close_feature ((COS_Feature)obj);
}
int
+cos_retain_index (COS_Object obj)
+{
+ return concord_close_index ((COS_Feature_INDEX)obj);
+}
+
+int
cos_release_index (COS_Object obj)
{
return concord_close_index ((COS_Feature_INDEX)obj);
int
+cos_retain_db_object (COS_Object obj)
+{
+ return 0;
+}
+
+int
cos_release_db_object (COS_Object obj)
{
return 0;