return (COS_object)((COS_INT)(num << 1) | 1);
}
+int
+cos_int_p (COS_object obj)
+{
+ return COS_OBJECT_INT_P (obj);
+}
+
COS_C_Int
cos_int_value (COS_object obj)
{
return INTPTR_MIN;
}
-int
-cos_int_p (COS_object obj)
-{
- return COS_OBJECT_INT_P (obj);
-}
-
COS_object
cos_make_char (int code)
}
int
-cos_char_id (COS_object obj)
+cos_char_p (COS_object obj)
{
- if (COS_OBJECT_CHAR_P (obj))
- return ((COS_INT)obj) >> 2;
- return -1;
+ return COS_OBJECT_CHAR_P (obj);
}
int
-cos_char_p (COS_object obj)
+cos_char_id (COS_object obj)
{
- return COS_OBJECT_CHAR_P (obj);
+ if (COS_OBJECT_CHAR_P (obj))
+ return ((COS_INT)obj) >> 2;
+ return -1;
}
return 0;
}
+int
+cos_cons_p (COS_object obj)
+{
+ return COS_OBJECT_CONS_P (obj);
+}
+
COS_object
cos_car (COS_Cons pair)
{
CONCORD_String_Tank val_st;
COS_String val_string;
size_t end;
- int val_cid;
- COS_String val_str;
- COS_object val_obj;
if (COS_OBJECT_CHAR_P (object))
{
concord_feature_get_name (fobj),
cos_string_data (val_string));
- val_obj = cos_read_int (CONCORD_String_data (&val_st),
+ return cos_read_object (CONCORD_String_data (&val_st),
CONCORD_String_size (&val_st),
0, &end);
- if ( val_obj != NULL )
- return val_obj;
-
- val_cid = cos_read_char (CONCORD_String_data (&val_st),
- CONCORD_String_size (&val_st),
- 0, &end);
- if ( val_cid >= 0 )
- return cos_make_char (val_cid);
-
- val_str = cos_read_string (CONCORD_String_data (&val_st),
- CONCORD_String_size (&val_st),
- 0, &end);
- if ( val_str != NULL )
- return val_str;
-
- return NULL;
}