Don't use scm_generalized_vector_get_handle() in array-map.c
[bpt/guile.git] / libguile / arbiters.c
index ec1eb78..5923c71 100644 (file)
@@ -1,22 +1,26 @@
-/*     Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
+/*     Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005, 2006, 2008 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 as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 
 \f
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include "libguile/_scm.h"
 #include "libguile/ports.h"
@@ -117,8 +121,10 @@ SCM_DEFINE (scm_try_arbiter, "try-arbiter", 1, 0, 0,
 #define FUNC_NAME s_scm_try_arbiter
 {
   scm_t_bits old;
+  scm_t_bits *loc;
   SCM_VALIDATE_SMOB (1, arb, arbiter);
-  FETCH_STORE (old, * (scm_t_bits *) SCM_CELL_OBJECT_LOC(arb,0), SCM_LOCK_VAL);
+  loc = (scm_t_bits*)SCM_SMOB_OBJECT_N_LOC (arb, 0);
+  FETCH_STORE (old, *loc, SCM_LOCK_VAL);
   return scm_from_bool (old == SCM_UNLOCK_VAL);
 }
 #undef FUNC_NAME
@@ -143,8 +149,10 @@ SCM_DEFINE (scm_release_arbiter, "release-arbiter", 1, 0, 0,
 #define FUNC_NAME s_scm_release_arbiter
 {
   scm_t_bits old;
+  scm_t_bits *loc;
   SCM_VALIDATE_SMOB (1, arb, arbiter);
-  FETCH_STORE (old, *(scm_t_bits*)SCM_CELL_OBJECT_LOC(arb,0), SCM_UNLOCK_VAL);
+  loc = (scm_t_bits*)SCM_SMOB_OBJECT_N_LOC (arb, 0);
+  FETCH_STORE (old, *loc, SCM_UNLOCK_VAL);
   return scm_from_bool (old == SCM_LOCK_VAL);
 }
 #undef FUNC_NAME
@@ -155,7 +163,6 @@ void
 scm_init_arbiters ()
 {
   scm_tc16_arbiter = scm_make_smob_type ("arbiter", 0);
-  scm_set_smob_mark (scm_tc16_arbiter, scm_markcdr);
   scm_set_smob_print (scm_tc16_arbiter, arbiter_print);
 #include "libguile/arbiters.x"
 }