unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* C99isms in arbiters.c, strings.c and threads.c
@ 2004-08-20 16:51 Andreas Vögele
  2004-08-22  1:47 ` Kevin Ryde
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Vögele @ 2004-08-20 16:51 UTC (permalink / raw)


Hi,

there are a couple of variable C99-style variable definitions in CVS 
HEAD.  Debian Woody and OpenBSD/i386 3.5 are both shipped with GCC 
2.95. IMHO it's too early to use C99isms.

Index: arbiters.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/arbiters.c,v
retrieving revision 1.35
diff -u -r1.35 arbiters.c
--- arbiters.c	17 Aug 2004 23:13:06 -0000	1.35
+++ arbiters.c	20 Aug 2004 16:43:25 -0000
@@ -116,8 +116,8 @@
  	    "@code{#f}.")
  #define FUNC_NAME s_scm_try_arbiter
  {
-  SCM_VALIDATE_SMOB (1, arb, arbiter);
    scm_t_bits old;
+  SCM_VALIDATE_SMOB (1, arb, arbiter);
    FETCH_STORE (old, * (scm_t_bits *) SCM_CELL_OBJECT_LOC(arb,0), 
SCM_LOCK_VAL);
    return scm_from_bool (old == SCM_UNLOCK_VAL);
  }
@@ -142,8 +142,8 @@
  	    "release it.")
  #define FUNC_NAME s_scm_release_arbiter
  {
-  SCM_VALIDATE_SMOB (1, arb, arbiter);
    scm_t_bits old;
+  SCM_VALIDATE_SMOB (1, arb, arbiter);
    FETCH_STORE (old, *(scm_t_bits*)SCM_CELL_OBJECT_LOC(arb,0), 
SCM_UNLOCK_VAL);
    return scm_from_bool (old == SCM_LOCK_VAL);
  }
Index: strings.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/strings.c,v
retrieving revision 1.86
diff -u -r1.86 strings.c
--- strings.c	19 Aug 2004 16:48:54 -0000	1.86
+++ strings.c	20 Aug 2004 16:43:25 -0000
@@ -717,9 +717,11 @@
    res = scm_i_make_string (i, &data);
    for (l = args; !SCM_NULLP (l); l = SCM_CDR (l))
      {
+      size_t len;
+
        s = SCM_CAR (l);
        SCM_VALIDATE_STRING (SCM_ARGn, s);
-      size_t len = scm_i_string_length (s);
+      len = scm_i_string_length (s);
        memcpy (data, scm_i_string_chars (s), len);
        data += len;
        scm_remember_upto_here_1 (s);
Index: threads.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/threads.c,v
retrieving revision 1.65
diff -u -r1.65 threads.c
--- threads.c	19 Aug 2004 17:16:01 -0000	1.65
+++ threads.c	20 Aug 2004 16:43:25 -0000
@@ -937,6 +937,7 @@
  scm_threads_mark_stacks (void)
  {
    volatile SCM c;
+  long stack_len;

    for (c = all_threads; !SCM_NULLP (c); c = SCM_CDR (c))
      {
@@ -955,10 +956,10 @@
  	}

  #if SCM_STACK_GROWS_UP
-      long stack_len = t->top - t->base;
+      stack_len = t->top - t->base;
        scm_mark_locations (t->base, stack_len);
  #else
-      long stack_len = t->base - t->top;
+      stack_len = t->base - t->top;
        scm_mark_locations (t->top, stack_len);
  #endif
        scm_mark_locations ((SCM_STACKITEM *) t->regs,



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-22  1:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-20 16:51 C99isms in arbiters.c, strings.c and threads.c Andreas Vögele
2004-08-22  1:47 ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).