Zero-offset branches are backward branches; fix "br" backward branches
[bpt/guile.git] / libguile / arrays.h
index a5ce577..6045ab6 100644 (file)
@@ -3,7 +3,8 @@
 #ifndef SCM_ARRAY_H
 #define SCM_ARRAY_H
 
-/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009,
+ *   2010, 2012 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -59,22 +60,20 @@ typedef struct scm_i_t_array
   unsigned long base;
 } scm_i_t_array;
 
-SCM_API scm_t_bits scm_i_tc16_array;
-
 #define SCM_I_ARRAY_FLAG_CONTIGUOUS (1 << 0)
 
-#define SCM_I_ARRAYP(a)            SCM_TYP16_PREDICATE (scm_i_tc16_array, a)
-#define SCM_I_ARRAY_NDIM(x)  ((size_t) (SCM_SMOB_FLAGS (x)>>1))
-#define SCM_I_ARRAY_CONTP(x) (SCM_SMOB_FLAGS(x) & SCM_I_ARRAY_FLAG_CONTIGUOUS)
+#define SCM_I_ARRAYP(a)            SCM_TYP16_PREDICATE (scm_tc7_array, a)
+#define SCM_I_ARRAY_NDIM(x)  ((size_t) (SCM_CELL_WORD_0 (x)>>17))
+#define SCM_I_ARRAY_CONTP(x) (SCM_CELL_WORD_0 (x) & (SCM_I_ARRAY_FLAG_CONTIGUOUS << 16))
 
-#define SCM_I_ARRAY_MEM(a)  ((scm_i_t_array *) SCM_SMOB_DATA_1 (a))
+#define SCM_I_ARRAY_MEM(a)  ((scm_i_t_array *) SCM_CELL_WORD_1 (a))
 #define SCM_I_ARRAY_V(a)    (SCM_I_ARRAY_MEM (a)->v)
 #define SCM_I_ARRAY_BASE(a) (SCM_I_ARRAY_MEM (a)->base)
 #define SCM_I_ARRAY_DIMS(a) \
   ((scm_t_array_dim *)((char *) SCM_I_ARRAY_MEM (a) + sizeof (scm_i_t_array)))
 
 SCM_INTERNAL SCM scm_i_make_array (int ndim);
-SCM_INTERNAL SCM scm_i_read_array (SCM port, int c);
+SCM_INTERNAL int scm_i_print_array (SCM array, SCM port, scm_print_state *pstate);
 
 SCM_INTERNAL void scm_init_arrays (void);