diff options
author | Andy Wingo <wingo@pobox.com> | 2014-04-14 15:14:26 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-04-14 15:14:26 +0200 |
commit | 8de051da47e8f0f56a13bde6a4b37ece5f9c81cf (patch) | |
tree | eb2245418fce972f4e0cec507d6aa00b48ce5f13 /libguile/frames.c | |
parent | 44d9705464d8f54111ed8a8a90d76f0c774e7184 (diff) | |
download | guile-8de051da47e8f0f56a13bde6a4b37ece5f9c81cf.tar.gz |
scm_c_make_frame takes struct scm_frame as arg
* libguile/frames.h:
* libguile/frames.c (scm_c_make_frame): Adapt to take a const struct
scm_frame as the argument. Adapt callers.
* libguile/continuations.c:
* libguile/stacks.c: Adapt callers.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r-- | libguile/frames.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libguile/frames.c b/libguile/frames.c index 3a2d01b6f..685e06d8b 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -35,17 +35,15 @@ verify (offsetof (struct scm_vm_frame, dynamic_link) == 0); SCM -scm_c_make_frame (enum scm_vm_frame_kind frame_kind, void *stack_holder, - scm_t_ptrdiff fp_offset, scm_t_ptrdiff sp_offset, - scm_t_uint32 *ip) +scm_c_make_frame (enum scm_vm_frame_kind kind, const struct scm_frame *frame) { struct scm_frame *p = scm_gc_malloc (sizeof (struct scm_frame), "vmframe"); - p->stack_holder = stack_holder; - p->fp_offset = fp_offset; - p->sp_offset = sp_offset; - p->ip = ip; - return scm_cell (scm_tc7_frame | (frame_kind << 8), (scm_t_bits)p); + p->stack_holder = frame->stack_holder; + p->fp_offset = frame->fp_offset; + p->sp_offset = frame->sp_offset; + p->ip = frame->ip; + return scm_cell (scm_tc7_frame | (kind << 8), (scm_t_bits)p); } void @@ -337,8 +335,7 @@ SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0, if (!scm_c_frame_previous (SCM_VM_FRAME_KIND (frame), &tmp)) return SCM_BOOL_F; - return scm_c_make_frame (kind, tmp.stack_holder, tmp.fp_offset, - tmp.sp_offset, tmp.ip); + return scm_c_make_frame (kind, &tmp); } #undef FUNC_NAME |