summaryrefslogtreecommitdiff
path: root/libguile/objcodes.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-01-27 13:11:02 +0100
committerAndy Wingo <wingo@pobox.com>2011-01-27 13:11:02 +0100
commit6ce3666ff2a8f73a6abab17535dc27051f8ab8b6 (patch)
tree8d8e35e367d8740011b2cbb37336125e5d868510 /libguile/objcodes.h
parentf9654187b1ff0e20dfcb66da963eae62f4d03be1 (diff)
downloadguile-6ce3666ff2a8f73a6abab17535dc27051f8ab8b6.tar.gz
for mmap objcodes, store the fd in the third word, as a scheme int
This leaves space for native code. * libguile/objcodes.h (SCM_OBJCODE_NATIVE_CODE) (SCM_SET_OBJCODE_NATIVE_CODE): Reserve the fourth word of objcode for "native code", whatever that means. * libguile/objcodes.c: Update a comment. (make_objcode_by_mmap): Put the fd in the third word.
Diffstat (limited to 'libguile/objcodes.h')
-rw-r--r--libguile/objcodes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/objcodes.h b/libguile/objcodes.h
index 36f3ea902..2fc43d5ed 100644
--- a/libguile/objcodes.h
+++ b/libguile/objcodes.h
@@ -57,6 +57,9 @@ struct scm_objcode
#define SCM_OBJCODE_IS_SLICE(x) (SCM_OBJCODE_TYPE (x) == SCM_OBJCODE_TYPE_SLICE)
#define SCM_OBJCODE_IS_STATIC(x) (SCM_OBJCODE_TYPE (x) == SCM_OBJCODE_TYPE_STATIC)
+#define SCM_OBJCODE_NATIVE_CODE(x) (SCM_CELL_WORD_3 (x))
+#define SCM_SET_OBJCODE_NATIVE_CODE(x, code) (SCM_SET_CELL_WORD_3 (x, code))
+
SCM scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr);
SCM_API SCM scm_load_objcode (SCM file);
SCM_API SCM scm_objcode_p (SCM obj);