to gdbscm_init_eqable_gsmob.
* guile/scm-gsmob.c (gdbscm_init_eqable_gsmob): New arg containing_scm.
All callers updated.
(gdbscm_fill_eqable_gsmob_ptr_slot): Delete arg containing_scm.
All callers updated.
* guile/guile-internal.h (gdbscm_init_eqable_gsmob): Update.
(gdbscm_fill_eqable_gsmob_ptr_slot): Update.
+2014-02-20 Doug Evans <xdje42@gmail.com>
+
+ * guile/scm-gsmob.c (gdbscm_init_eqable_gsmob): New arg containing_scm.
+ All callers updated.
+ (gdbscm_fill_eqable_gsmob_ptr_slot): Delete arg containing_scm.
+ All callers updated.
+ * guile/guile-internal.h (gdbscm_init_eqable_gsmob): Update.
+ (gdbscm_fill_eqable_gsmob_ptr_slot): Update.
+
2014-02-20 lin zuojian <manjian2006@gmail.com>
Joel Brobecker <brobecker@adacore.com>
Doug Evans <xdje42@gmail.com>
extern void gdbscm_init_chained_gsmob (chained_gdb_smob *base);
-extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base);
+extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base,
+ SCM containing_scm);
extern SCM gdbscm_mark_gsmob (gdb_smob *base);
(htab_t htab, eqable_gdb_smob *base);
extern void gdbscm_fill_eqable_gsmob_ptr_slot (eqable_gdb_smob **slot,
- eqable_gdb_smob *base,
- SCM containing_scm);
+ eqable_gdb_smob *base);
extern void gdbscm_clear_eqable_gsmob_ptr_slot (htab_t htab,
eqable_gdb_smob *base);
b_smob->block = NULL;
b_smob->objfile = NULL;
b_scm = scm_new_smob (block_smob_tag, (scm_t_bits) b_smob);
- gdbscm_init_eqable_gsmob (&b_smob->base);
+ gdbscm_init_eqable_gsmob (&b_smob->base, b_scm);
return b_scm;
}
b_smob = (block_smob *) SCM_SMOB_DATA (b_scm);
b_smob->block = block;
b_smob->objfile = objfile;
- gdbscm_fill_eqable_gsmob_ptr_slot (slot, &b_smob->base, b_scm);
+ gdbscm_fill_eqable_gsmob_ptr_slot (slot, &b_smob->base);
return b_scm;
}
f_smob->inferior = NULL;
f_smob->frame_id_is_next = 0;
f_scm = scm_new_smob (frame_smob_tag, (scm_t_bits) f_smob);
- gdbscm_init_eqable_gsmob (&f_smob->base);
+ gdbscm_init_eqable_gsmob (&f_smob->base, f_scm);
return f_scm;
}
f_smob->inferior = inferior;
f_smob->frame_id_is_next = frame_id_is_next;
- gdbscm_fill_eqable_gsmob_ptr_slot (slot, &f_smob->base, f_scm);
+ gdbscm_fill_eqable_gsmob_ptr_slot (slot, &f_smob->base);
return f_scm;
}
/* Initialize an eqable_gdb_smob.
This is the same as gdbscm_init_gsmob except that it also sets
- containing_scm to #f. */
+ BASE->containing_scm to CONTAINING_SCM. */
void
-gdbscm_init_eqable_gsmob (eqable_gdb_smob *base)
+gdbscm_init_eqable_gsmob (eqable_gdb_smob *base, SCM containing_scm)
{
gdbscm_init_gsmob ((gdb_smob *) base);
- base->containing_scm = SCM_BOOL_F;
+ base->containing_scm = containing_scm;
}
/* Call this from each smob's "mark" routine.
return (eqable_gdb_smob **) slot;
}
-/* Record CONTAINING_SCM as the object containing BASE, and record it in
- SLOT. SLOT must be the result of calling gdbscm_find_eqable_gsmob_ptr_slot
- on BASE (or equivalent for lookup). */
+/* Record BASE in SLOT. SLOT must be the result of calling
+ gdbscm_find_eqable_gsmob_ptr_slot on BASE (or equivalent for lookup). */
void
gdbscm_fill_eqable_gsmob_ptr_slot (eqable_gdb_smob **slot,
- eqable_gdb_smob *base,
- SCM containing_scm)
+ eqable_gdb_smob *base)
{
- base->containing_scm = containing_scm;
*slot = base;
}
s_smob->symbol = NULL;
s_scm = scm_new_smob (symbol_smob_tag, (scm_t_bits) s_smob);
- gdbscm_init_eqable_gsmob (&s_smob->base);
+ gdbscm_init_eqable_gsmob (&s_smob->base, s_scm);
return s_scm;
}
s_scm = syscm_make_symbol_smob ();
s_smob = (symbol_smob *) SCM_SMOB_DATA (s_scm);
s_smob->symbol = symbol;
- gdbscm_fill_eqable_gsmob_ptr_slot (slot, &s_smob->base, s_scm);
+ gdbscm_fill_eqable_gsmob_ptr_slot (slot, &s_smob->base);
return s_scm;
}
st_smob->symtab = NULL;
st_scm = scm_new_smob (symtab_smob_tag, (scm_t_bits) st_smob);
- gdbscm_init_eqable_gsmob (&st_smob->base);
+ gdbscm_init_eqable_gsmob (&st_smob->base, st_scm);
return st_scm;
}
st_scm = stscm_make_symtab_smob ();
st_smob = (symtab_smob *) SCM_SMOB_DATA (st_scm);
st_smob->symtab = symtab;
- gdbscm_fill_eqable_gsmob_ptr_slot (slot, &st_smob->base, st_scm);
+ gdbscm_fill_eqable_gsmob_ptr_slot (slot, &st_smob->base);
return st_scm;
}
t_smob->type = NULL;
t_scm = scm_new_smob (type_smob_tag, (scm_t_bits) t_smob);
- gdbscm_init_eqable_gsmob (&t_smob->base);
+ gdbscm_init_eqable_gsmob (&t_smob->base, t_scm);
return t_scm;
}
t_scm = tyscm_make_type_smob ();
t_smob = (type_smob *) SCM_SMOB_DATA (t_scm);
t_smob->type = type;
- gdbscm_fill_eqable_gsmob_ptr_slot (slot, &t_smob->base, t_scm);
+ gdbscm_fill_eqable_gsmob_ptr_slot (slot, &t_smob->base);
return t_scm;
}