mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-05 06:50:21 +02:00
remove unused things from object.[ch]
* libguile/objects.h: * libguile/objects.c (scm_object_procedure): Remove, it was only compiled with SCM_DEBUG. * libguile/objects.h: * libguile/objects.c (scm_make_class_object, scm_make_subclass_object, (scm_i_make_class_object, scm_metaclass_standard): Remove also. These implemented an undocumented object system, and are totally replaced by GOOPS.
This commit is contained in:
parent
730d8ad9e6
commit
48c7c44e70
2 changed files with 1 additions and 90 deletions
|
@ -253,68 +253,7 @@ SCM_SET_ENTITY_PROCEDURE (obj, proc);
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
#ifdef GUILE_DEBUG
|
||||
SCM_DEFINE (scm_object_procedure, "object-procedure", 1, 0, 0,
|
||||
(SCM obj),
|
||||
"Return the object procedure of @var{obj}. @var{obj} must be\n"
|
||||
"an entity.")
|
||||
#define FUNC_NAME s_scm_object_procedure
|
||||
{
|
||||
SCM_ASSERT (SCM_STRUCTP (obj) && SCM_I_ENTITYP (obj),
|
||||
obj, SCM_ARG1, FUNC_NAME);
|
||||
return SCM_ENTITY_PROCEDURE (obj);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
#endif /* GUILE_DEBUG */
|
||||
|
||||
/* The following procedures are not a part of Goops but a minimal
|
||||
* object system built upon structs. They are here for those who
|
||||
* want to implement their own object system.
|
||||
*/
|
||||
|
||||
SCM
|
||||
scm_i_make_class_object (SCM meta,
|
||||
SCM layout_string,
|
||||
unsigned long flags)
|
||||
{
|
||||
SCM c;
|
||||
SCM layout = scm_make_struct_layout (layout_string);
|
||||
c = scm_make_struct (meta,
|
||||
SCM_INUM0,
|
||||
scm_list_4 (layout, SCM_BOOL_F, SCM_EOL, SCM_EOL));
|
||||
SCM_SET_CLASS_FLAGS (c, flags);
|
||||
return c;
|
||||
}
|
||||
|
||||
SCM_DEFINE (scm_make_class_object, "make-class-object", 2, 0, 0,
|
||||
(SCM metaclass, SCM layout),
|
||||
"Create a new class object of class @var{metaclass}, with the\n"
|
||||
"slot layout specified by @var{layout}.")
|
||||
#define FUNC_NAME s_scm_make_class_object
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
SCM_VALIDATE_STRUCT (1, metaclass);
|
||||
SCM_VALIDATE_STRING (2, layout);
|
||||
return scm_i_make_class_object (metaclass, layout, flags);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
SCM_DEFINE (scm_make_subclass_object, "make-subclass-object", 2, 0, 0,
|
||||
(SCM class, SCM layout),
|
||||
"Create a subclass object of @var{class}, with the slot layout\n"
|
||||
"specified by @var{layout}.")
|
||||
#define FUNC_NAME s_scm_make_subclass_object
|
||||
{
|
||||
SCM pl;
|
||||
SCM_VALIDATE_STRUCT (1, class);
|
||||
SCM_VALIDATE_STRING (2, layout);
|
||||
pl = SCM_PACK (SCM_STRUCT_DATA (class) [scm_vtable_index_layout]);
|
||||
pl = scm_symbol_to_string (pl);
|
||||
return scm_i_make_class_object (SCM_STRUCT_VTABLE (class),
|
||||
scm_string_append (scm_list_2 (pl, layout)),
|
||||
SCM_CLASS_FLAGS (class));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
#define SCM_METACLASS_STANDARD_LAYOUT ""
|
||||
|
||||
void
|
||||
scm_init_objects ()
|
||||
|
|
|
@ -68,14 +68,6 @@
|
|||
(SCM_STRUCT_DATA (c)[scm_struct_i_size] \
|
||||
= (SCM_STRUCT_DATA (c) [scm_struct_i_size] & SCM_STRUCTF_MASK) | s)
|
||||
|
||||
#define SCM_METACLASS_STANDARD_LAYOUT ""
|
||||
struct scm_metaclass_standard {
|
||||
SCM layout;
|
||||
SCM vcell;
|
||||
SCM vtable;
|
||||
SCM print;
|
||||
};
|
||||
|
||||
/* {Entity classes}
|
||||
*
|
||||
* For instances of entity classes (entities), the procedures to be
|
||||
|
@ -101,16 +93,6 @@ struct scm_metaclass_standard {
|
|||
#define SCM_CLASS_OF(x) SCM_STRUCT_VTABLE (x)
|
||||
#define SCM_OBJ_CLASS_REDEF(x) (SCM_PACK (SCM_STRUCT_VTABLE_DATA (x) [scm_si_redefined]))
|
||||
|
||||
typedef struct scm_effective_slot_definition {
|
||||
SCM name;
|
||||
long location;
|
||||
SCM init_value;
|
||||
SCM (*get) (SCM obj, SCM slotdef);
|
||||
SCM (*set) (SCM obj, SCM slotdef, SCM value);
|
||||
} scm_effective_slot_definition;
|
||||
|
||||
#define SCM_ESLOTDEF(x) ((scm_effective_slot_definition *) SCM_CDR (x))
|
||||
|
||||
#define SCM_CMETHOD_CODE(cmethod) SCM_CDR (cmethod)
|
||||
#define SCM_CMETHOD_FORMALS(cmethod) SCM_CAR (SCM_CMETHOD_CODE (cmethod))
|
||||
#define SCM_CMETHOD_BODY(cmethod) SCM_CDR (SCM_CMETHOD_CODE (cmethod))
|
||||
|
@ -121,9 +103,6 @@ typedef struct scm_effective_slot_definition {
|
|||
#define SCM_OUT_PCLASS_INDEX SCM_I_MAX_PORT_TYPE_COUNT
|
||||
#define SCM_INOUT_PCLASS_INDEX (2 * SCM_I_MAX_PORT_TYPE_COUNT)
|
||||
|
||||
/* Plugin proxy classes for basic types. */
|
||||
SCM_API SCM scm_metaclass_standard;
|
||||
|
||||
/* Goops functions. */
|
||||
SCM_API SCM scm_make_extended_class (char const *type_name, int applicablep);
|
||||
SCM_INTERNAL void scm_i_inherit_applicable (SCM c);
|
||||
|
@ -143,14 +122,7 @@ SCM_API SCM scm_call_generic_3 (SCM gf, SCM a1, SCM a2, SCM a3);
|
|||
SCM_API SCM scm_entity_p (SCM obj);
|
||||
SCM_API SCM scm_valid_object_procedure_p (SCM proc);
|
||||
SCM_API SCM scm_set_object_procedure_x (SCM obj, SCM proc);
|
||||
#ifdef GUILE_DEBUG
|
||||
SCM_API SCM scm_object_procedure (SCM obj);
|
||||
#endif
|
||||
SCM_API SCM scm_make_class_object (SCM metaclass, SCM layout);
|
||||
SCM_API SCM scm_make_subclass_object (SCM c, SCM layout);
|
||||
|
||||
SCM_INTERNAL SCM scm_i_make_class_object (SCM metaclass, SCM layout_string,
|
||||
unsigned long flags);
|
||||
SCM_INTERNAL void scm_init_objects (void);
|
||||
|
||||
#endif /* SCM_OBJECTS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue