reader options macros incorrect when SCM_ENABLE_ELISP undefined
authorMichael Gran <spk121@yahoo.com>
Sun, 17 Jan 2010 21:40:18 +0000 (13:40 -0800)
committerMichael Gran <spk121@yahoo.com>
Sun, 17 Jan 2010 21:40:18 +0000 (13:40 -0800)
When compiled with SCM_ENABLE_ELISP undefined, the reader options
macros SCM_R6RS_ESCAPES_P and SCM_SQUARE_BRACKETS_P point past
the end of the scm_read_opts struct.

*libguile/private-options.h (SCM_R6RS_ESCAPES_P) [!SCM_ENABLE_ELISP]: modified
 (SCM_SQUARE_BRACKETS_P) [!SCM_ENABLE_ELISP]: modified
 (SCM_N_READ_OPTIONS): modified

libguile/private-options.h

index f027b72..2e9728d 100644 (file)
@@ -94,14 +94,17 @@ SCM_API scm_t_option scm_read_opts[];
 #if SCM_ENABLE_ELISP
 #define SCM_ELISP_VECTORS_P    scm_read_opts[4].val
 #define SCM_ESCAPED_PARENS_P   scm_read_opts[5].val
-#endif
 #define SCM_R6RS_ESCAPES_P     scm_read_opts[6].val
 #define SCM_SQUARE_BRACKETS_P  scm_read_opts[7].val
+#else
+#define SCM_R6RS_ESCAPES_P     scm_read_opts[4].val
+#define SCM_SQUARE_BRACKETS_P  scm_read_opts[5].val
+#endif
 
 #if SCM_ENABLE_ELISP
-#define SCM_N_READ_OPTIONS 7
+#define SCM_N_READ_OPTIONS 8
 #else
-#define SCM_N_READ_OPTIONS 5
+#define SCM_N_READ_OPTIONS 6
 #endif
 
 #endif  /* PRIVATE_OPTIONS */