summaryrefslogtreecommitdiff
path: root/libguile/frames.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-11-18 22:30:27 +0100
committerAndy Wingo <wingo@pobox.com>2010-11-19 15:22:43 +0100
commit3d27ef4bd312750f8edca81f09644eab21a3d8e0 (patch)
tree74f9b5a8c6419e5b2c14bd7df069e7b8c621fa62 /libguile/frames.c
parentf0c56cadfda6f8e9691d5e12cbd1778f36bfde2a (diff)
downloadguile-3d27ef4bd312750f8edca81f09644eab21a3d8e0.tar.gz
fix a number of assumptions that a pointer could fit into a long
* libguile/debug.c: * libguile/eval.c: * libguile/frames.c: * libguile/objcodes.c: * libguile/print.c: * libguile/programs.c: * libguile/read.c: * libguile/struct.c: * libguile/vm.c: Fix a number of instances in which we assumed we could fit a pointer into a long.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r--libguile/frames.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libguile/frames.c b/libguile/frames.c
index 67ddd1a17..2f870843b 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -209,7 +209,7 @@ SCM_DEFINE (scm_frame_address, "frame-address", 1, 0, 0,
#define FUNC_NAME s_scm_frame_address
{
SCM_VALIDATE_VM_FRAME (1, frame);
- return scm_from_ulong ((unsigned long) SCM_VM_FRAME_FP (frame));
+ return scm_from_unsigned_integer ((scm_t_bits) SCM_VM_FRAME_FP (frame));
}
#undef FUNC_NAME
@@ -220,7 +220,7 @@ SCM_DEFINE (scm_frame_stack_pointer, "frame-stack-pointer", 1, 0, 0,
{
SCM_VALIDATE_VM_FRAME (1, frame);
- return scm_from_ulong ((unsigned long) SCM_VM_FRAME_SP (frame));
+ return scm_from_unsigned_integer ((scm_t_bits) SCM_VM_FRAME_SP (frame));
}
#undef FUNC_NAME
@@ -234,9 +234,8 @@ SCM_DEFINE (scm_frame_instruction_pointer, "frame-instruction-pointer", 1, 0, 0,
SCM_VALIDATE_VM_FRAME (1, frame);
c_objcode = SCM_PROGRAM_DATA (scm_frame_procedure (frame));
- return scm_from_ulong ((unsigned long)
- (SCM_VM_FRAME_IP (frame)
- - SCM_C_OBJCODE_BASE (c_objcode)));
+ return scm_from_unsigned_integer ((SCM_VM_FRAME_IP (frame)
+ - SCM_C_OBJCODE_BASE (c_objcode)));
}
#undef FUNC_NAME
@@ -246,9 +245,9 @@ SCM_DEFINE (scm_frame_return_address, "frame-return-address", 1, 0, 0,
#define FUNC_NAME s_scm_frame_return_address
{
SCM_VALIDATE_VM_FRAME (1, frame);
- return scm_from_ulong ((unsigned long)
- (SCM_FRAME_RETURN_ADDRESS
- (SCM_VM_FRAME_FP (frame))));
+ return scm_from_unsigned_integer ((scm_t_bits)
+ (SCM_FRAME_RETURN_ADDRESS
+ (SCM_VM_FRAME_FP (frame))));
}
#undef FUNC_NAME
@@ -258,9 +257,9 @@ SCM_DEFINE (scm_frame_mv_return_address, "frame-mv-return-address", 1, 0, 0,
#define FUNC_NAME s_scm_frame_mv_return_address
{
SCM_VALIDATE_VM_FRAME (1, frame);
- return scm_from_ulong ((unsigned long)
- (SCM_FRAME_MV_RETURN_ADDRESS
- (SCM_VM_FRAME_FP (frame))));
+ return scm_from_unsigned_integer ((scm_t_bits)
+ (SCM_FRAME_MV_RETURN_ADDRESS
+ (SCM_VM_FRAME_FP (frame))));
}
#undef FUNC_NAME