guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core NEWS RELEASE libguile/ChangeLo...


From: Dirk Herrmann
Subject: guile/guile-core NEWS RELEASE libguile/ChangeLo...
Date: Thu, 23 Nov 2000 05:54:50 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Dirk Herrmann <address@hidden>  00/11/23 05:54:49

Modified files:
        guile-core     : NEWS RELEASE 
        guile-core/libguile: ChangeLog gh_data.c numbers.c numbers.h 
                             strings.c strings.h symbols.c symbols.h 
                             unif.c unif.h vectors.c vectors.h 

Log message:
        * SCM_SETCHARS deprecated.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/NEWS.diff?r1=1.218&r2=1.219
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/RELEASE.diff?r1=1.77&r2=1.78
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/ChangeLog.diff?r1=1.1173&r2=1.1174
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/gh_data.c.diff?r1=1.45&r2=1.46
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/numbers.c.diff?r1=1.108&r2=1.109
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/numbers.h.diff?r1=1.44&r2=1.45
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strings.c.diff?r1=1.46&r2=1.47
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/strings.h.diff?r1=1.25&r2=1.26
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.c.diff?r1=1.66&r2=1.67
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/symbols.h.diff?r1=1.42&r2=1.43
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/unif.c.diff?r1=1.93&r2=1.94
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/unif.h.diff?r1=1.30&r2=1.31
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/vectors.c.diff?r1=1.40&r2=1.41
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/libguile/vectors.h.diff?r1=1.25&r2=1.26

Patches:
Index: guile/guile-core/NEWS
diff -u guile/guile-core/NEWS:1.218 guile/guile-core/NEWS:1.219
--- guile/guile-core/NEWS:1.218 Thu Nov 23 00:59:22 2000
+++ guile/guile-core/NEWS       Thu Nov 23 05:54:48 2000
@@ -255,6 +255,12 @@
 
 Use these instead of SCM_CHARS or SCM_VELTS.
 
+** New macros:  SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS, 
+SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
+SCM_SET_VECTOR_BASE
+
+Use these instead of SCM_SETCHARS.
+
 ** New macro:  SCM_BITVECTOR_P
 
 ** New macro:  SCM_STRING_COERCE_0TERMINATION_X
@@ -270,7 +276,7 @@
 SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
 SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
 SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
-SCM_ROUCHARS, SCM_SETLENGTH
+SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS
 
 Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
 Use scm_memory_error instead of SCM_NALLOC.
@@ -287,6 +293,7 @@
 Use SCM_STRING_CHARS instead of SCM_ROCHARS.
 Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
 Use a type specific setter macro instead of SCM_SETLENGTH.
+Use a type specific setter macro instead of SCM_SETCHARS.
 
 ** Removed function:  scm_struct_init
 
Index: guile/guile-core/RELEASE
diff -u guile/guile-core/RELEASE:1.77 guile/guile-core/RELEASE:1.78
--- guile/guile-core/RELEASE:1.77       Thu Nov 23 00:59:22 2000
+++ guile/guile-core/RELEASE    Thu Nov 23 05:54:48 2000
@@ -50,7 +50,7 @@
   SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH,
   SCM_LENGTH, SCM_HUGE_LENGTH, SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
   SCM_COERCE_SUBSTR, SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING,
-  SCM_ROCHARS, SCM_ROUCHARS, SCM_SETLENGTH
+  SCM_ROCHARS, SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS
 - remove scm_vector_set_length_x
 - remove function scm_call_catching_errors
   (replaced by catch functions from throw.[ch])
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1173 
guile/guile-core/libguile/ChangeLog:1.1174
--- guile/guile-core/libguile/ChangeLog:1.1173  Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/ChangeLog Thu Nov 23 05:54:48 2000
@@ -1,5 +1,20 @@
 2000-11-22  Dirk Herrmann  <address@hidden>
 
+       * gh_data.c (makvect), numbers.c (scm_mkbig, scm_adjbig),
+       strings.c (scm_makstr, scm_take_str), symbols.c
+       (scm_intern_obarray_soft, scm_sysintern0_no_module_lookup), unif.c
+       (scm_make_uve), vectors.c (scm_make_vector): Use appropriate
+       SCM_SET_<type>_(CHARS|BASE) macro instead of SCM_SETCHARS.
+
+       * numbers.h (SCM_SET_BIGNUM_BASE), strings.h
+       (SCM_SET_STRING_CHARS), symbols.h (SCM_SET_SYMBOL_CHARS), unif.h
+       (SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE), vectors.h
+       (SCM_SET_VECTOR_BASE):  Added.
+
+       * symbols.c (SCM_SETCHARS):  Deprecated.
+
+2000-11-22  Dirk Herrmann  <address@hidden>
+
        * gc.c (scm_gc_sweep), unif.c (scm_make_uve):  Don't allocate or
        free memory for empty bitvectors.
 
Index: guile/guile-core/libguile/gh_data.c
diff -u guile/guile-core/libguile/gh_data.c:1.45 
guile/guile-core/libguile/gh_data.c:1.46
--- guile/guile-core/libguile/gh_data.c:1.45    Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/gh_data.c Thu Nov 23 05:54:49 2000
@@ -169,7 +169,7 @@
   SCM ans;
   SCM_NEWCELL (ans);
   SCM_DEFER_INTS;
-  SCM_SETCHARS (ans, m);
+  SCM_SET_UVECTOR_BASE (ans, m);
   SCM_SET_UVECTOR_LENGTH (ans, len, type);
   SCM_ALLOW_INTS;
   return ans;
Index: guile/guile-core/libguile/numbers.c
diff -u guile/guile-core/libguile/numbers.c:1.108 
guile/guile-core/libguile/numbers.c:1.109
--- guile/guile-core/libguile/numbers.c:1.108   Wed Nov 22 03:20:03 2000
+++ guile/guile-core/libguile/numbers.c Thu Nov 23 05:54:49 2000
@@ -1323,8 +1323,7 @@
   
   SCM_NEWCELL (v);
   SCM_DEFER_INTS;
-  SCM_SETCHARS (v, scm_must_malloc ((long) (nlen * sizeof (SCM_BIGDIG)),
-                                   s_bignum));
+  SCM_SET_BIGNUM_BASE (v, scm_must_malloc (nlen * sizeof (SCM_BIGDIG), 
s_bignum));
   SCM_SETNUMDIGS (v, nlen, sign);
   SCM_ALLOW_INTS;
   return v;
@@ -1366,7 +1365,7 @@
                           (long) (SCM_NUMDIGS (b) * sizeof (SCM_BIGDIG)),
                           (long) (nsiz * sizeof (SCM_BIGDIG)), s_bignum));
 
-    SCM_SETCHARS (b, digits);
+    SCM_SET_BIGNUM_BASE (b, digits);
     SCM_SETNUMDIGS (b, nsiz, SCM_BIGSIGN (b));
   }
   SCM_ALLOW_INTS;
Index: guile/guile-core/libguile/numbers.h
diff -u guile/guile-core/libguile/numbers.h:1.44 
guile/guile-core/libguile/numbers.h:1.45
--- guile/guile-core/libguile/numbers.h:1.44    Tue Sep 26 14:53:49 2000
+++ guile/guile-core/libguile/numbers.h Thu Nov 23 05:54:49 2000
@@ -179,6 +179,7 @@
 #define SCM_BIGSIZEFIELD 17
 #define SCM_BIGSIGN(x) (SCM_CELL_WORD_0 (x) & SCM_BIGSIGNFLAG)
 #define SCM_BDIGITS(x) ((SCM_BIGDIG *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SET_BIGNUM_BASE(n, b) (SCM_SET_CELL_WORD_1 ((n), (b)))
 #define SCM_NUMDIGS(x) ((scm_sizet) (SCM_CELL_WORD_0 (x) >> SCM_BIGSIZEFIELD))
 #define SCM_SETNUMDIGS(x, v, sign) \
   SCM_SET_CELL_WORD_0 (x, \
Index: guile/guile-core/libguile/strings.c
diff -u guile/guile-core/libguile/strings.c:1.46 
guile/guile-core/libguile/strings.c:1.47
--- guile/guile-core/libguile/strings.c:1.46    Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/strings.c Thu Nov 23 05:54:49 2000
@@ -132,7 +132,7 @@
 
   mem[len] = 0;
   SCM_NEWCELL (s);
-  SCM_SETCHARS (s, mem);
+  SCM_SET_STRING_CHARS (s, mem);
   SCM_SET_STRING_LENGTH (s, len);
 
   return s;
@@ -170,7 +170,7 @@
   SCM_DEFER_INTS;
   SCM_SET_STRING_LENGTH (answer, len);
   scm_done_malloc (len + 1);
-  SCM_SETCHARS (answer, s);
+  SCM_SET_STRING_CHARS (answer, s);
   SCM_ALLOW_INTS;
   return answer;
 }
Index: guile/guile-core/libguile/strings.h
diff -u guile/guile-core/libguile/strings.h:1.25 
guile/guile-core/libguile/strings.h:1.26
--- guile/guile-core/libguile/strings.h:1.25    Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/strings.h Thu Nov 23 05:54:49 2000
@@ -56,6 +56,7 @@
 #define SCM_STRING_UCHARS(x) ((unsigned char *) (SCM_CELL_WORD_1 (x)))
 #define SCM_STRING_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
 #endif
+#define SCM_SET_STRING_CHARS(s, c) (SCM_SET_CELL_WORD_1 ((s), (c)))
 #define SCM_STRING_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
 #define SCM_SET_STRING_LENGTH(s, l) (SCM_SET_CELL_WORD_0 ((s), ((l) << 8) + 
scm_tc7_string))
 
Index: guile/guile-core/libguile/symbols.c
diff -u guile/guile-core/libguile/symbols.c:1.66 
guile/guile-core/libguile/symbols.c:1.67
--- guile/guile-core/libguile/symbols.c:1.66    Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/symbols.c Thu Nov 23 05:54:49 2000
@@ -291,7 +291,7 @@
     }
 
   SCM_NEWCELL2 (lsym);
-  SCM_SETCHARS (lsym, duplicate_string (name, len));
+  SCM_SET_SYMBOL_CHARS (lsym, duplicate_string (name, len));
   SCM_SET_SYMBOL_HASH (lsym, raw_hash);
   SCM_SET_PROP_SLOTS (lsym, scm_cons (SCM_BOOL_F, SCM_EOL));
   SCM_SET_SYMBOL_LENGTH (lsym, (long) len);
@@ -366,7 +366,7 @@
       scm_sizet hash = raw_hash % scm_symhash_dim;
 
       SCM_NEWCELL2 (lsym);
-      SCM_SETCHARS (lsym, name);
+      SCM_SET_SYMBOL_CHARS (lsym, name);
       SCM_SET_SYMBOL_HASH (lsym, raw_hash);
       SCM_SET_PROP_SLOTS (lsym, scm_cons (SCM_BOOL_F, SCM_EOL));
       SCM_SET_SYMBOL_LENGTH (lsym, (long) len);
Index: guile/guile-core/libguile/symbols.h
diff -u guile/guile-core/libguile/symbols.h:1.42 
guile/guile-core/libguile/symbols.h:1.43
--- guile/guile-core/libguile/symbols.h:1.42    Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/symbols.h Thu Nov 23 05:54:49 2000
@@ -59,13 +59,12 @@
 #define SCM_SYMBOLP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_symbol))
 #define SCM_SYMBOL_UCHARS(x)  ((unsigned char *) (SCM_CELL_WORD_1 (x)))
 #define SCM_SYMBOL_CHARS(x)  ((char *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SET_SYMBOL_CHARS(s, c)  (SCM_SET_CELL_WORD_1 ((s), (c)))
 #define SCM_SYMBOL_LENGTH(x)  (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
 #define SCM_SET_SYMBOL_LENGTH(s, l) (SCM_SET_CELL_WORD_0 ((s), ((l) << 8) + 
scm_tc7_symbol))
 
 #define SCM_LENGTH_MAX         (0xffffffL)
 
-#define SCM_SETCHARS(x, v)     (SCM_SET_CELL_WORD_1 ((x), (scm_bits_t) (v)))
-
 #define SCM_PROP_SLOTS(X)           (SCM_CELL_WORD_3 (X))
 #define SCM_SET_PROP_SLOTS(X, v)    (SCM_SET_CELL_WORD_3 ((X), (v)))
 #define SCM_SYMBOL_FUNC(X)         (SCM_CAR (SCM_CELL_WORD_3 (X)))
@@ -116,6 +115,7 @@
 
 #define SCM_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
 #define SCM_UCHARS(x) ((unsigned char *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SETCHARS(x, v) (SCM_SET_CELL_WORD_1 ((x), (scm_bits_t) (v)))
 #define SCM_SLOPPY_SUBSTRP(x) (SCM_SUBSTRP (x))
 #define SCM_SUBSTR_STR(x) (SCM_CDDR (x))
 #define SCM_SUBSTR_OFFSET(x) (SCM_CADR (x))
Index: guile/guile-core/libguile/unif.c
diff -u guile/guile-core/libguile/unif.c:1.93 
guile/guile-core/libguile/unif.c:1.94
--- guile/guile-core/libguile/unif.c:1.93       Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/unif.c    Thu Nov 23 05:54:49 2000
@@ -166,12 +166,12 @@
       if (k > 0)
        {
          i = sizeof (long) * ((k + SCM_LONG_BIT - 1) / SCM_LONG_BIT);
-         SCM_SETCHARS (v, (char *) scm_must_malloc (i, "vector"));
+         SCM_SET_BITVECTOR_BASE (v, (char *) scm_must_malloc (i, "vector"));
          SCM_SET_BITVECTOR_LENGTH (v, k);
        }
       else
        {
-         SCM_SETCHARS (v, 0);
+         SCM_SET_BITVECTOR_BASE (v, 0);
          SCM_SET_BITVECTOR_LENGTH (v, 0);
        }
       return v;
@@ -239,7 +239,7 @@
 
   SCM_NEWCELL (v);
   SCM_DEFER_INTS;
-  SCM_SETCHARS (v, (char *) scm_must_malloc (i ? i : 1, "vector"));
+  SCM_SET_UVECTOR_BASE (v, (char *) scm_must_malloc (i ? i : 1, "vector"));
   SCM_SET_UVECTOR_LENGTH (v, k, type);
   SCM_ALLOW_INTS;
   return v;
Index: guile/guile-core/libguile/unif.h
diff -u guile/guile-core/libguile/unif.h:1.30 
guile/guile-core/libguile/unif.h:1.31
--- guile/guile-core/libguile/unif.h:1.30       Thu Nov 23 00:59:22 2000
+++ guile/guile-core/libguile/unif.h    Thu Nov 23 05:54:49 2000
@@ -87,11 +87,13 @@
 #define SCM_ARRAY_DIMS(a) ((scm_array_dim *)((char *) SCM_ARRAY_MEM (a) + 
sizeof (scm_array))) 
 
 #define SCM_UVECTOR_BASE(x) ((void *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SET_UVECTOR_BASE(v, b) (SCM_SET_CELL_WORD_1 ((v), (b)))
 #define SCM_UVECTOR_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
 #define SCM_SET_UVECTOR_LENGTH(v, l, t) (SCM_SET_CELL_WORD_0 ((v), ((l) << 8) 
+ (t)))
 
 #define SCM_BITVECTOR_P(x) (!SCM_IMP (x) && (SCM_TYP7 (x) == scm_tc7_bvect))
 #define SCM_BITVECTOR_BASE(x) ((void *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SET_BITVECTOR_BASE(v, b) (SCM_SET_CELL_WORD_1 ((v), (b)))
 #define SCM_BITVECTOR_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
 #define SCM_SET_BITVECTOR_LENGTH(v, l) (SCM_SET_CELL_WORD_0 ((v), ((l) << 8) + 
scm_tc7_bvect))
 
Index: guile/guile-core/libguile/vectors.c
diff -u guile/guile-core/libguile/vectors.c:1.40 
guile/guile-core/libguile/vectors.c:1.41
--- guile/guile-core/libguile/vectors.c:1.40    Wed Nov 22 06:45:41 2000
+++ guile/guile-core/libguile/vectors.c Thu Nov 23 05:54:49 2000
@@ -292,7 +292,7 @@
     for (j = 0; j != i; ++j)
       velts[j] = SCM_UNPACK (fill);
 
-    SCM_SETCHARS (v, velts);
+    SCM_SET_VECTOR_BASE (v, velts);
     SCM_SET_VECTOR_LENGTH (v, i, scm_tc7_vector);
   }
   SCM_ALLOW_INTS;
Index: guile/guile-core/libguile/vectors.h
diff -u guile/guile-core/libguile/vectors.h:1.25 
guile/guile-core/libguile/vectors.h:1.26
--- guile/guile-core/libguile/vectors.h:1.25    Wed Nov 22 06:45:41 2000
+++ guile/guile-core/libguile/vectors.h Thu Nov 23 05:54:49 2000
@@ -53,6 +53,7 @@
 
 #define SCM_VECTORP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_vector))
 #define SCM_VECTOR_BASE(x) ((scm_bits_t *) SCM_CELL_WORD_1 (x))
+#define SCM_SET_VECTOR_BASE(v, b) (SCM_SET_CELL_WORD_1 ((v), (b)))
 #define SCM_VECTOR_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
 #define SCM_SET_VECTOR_LENGTH(v, l, t) (SCM_SET_CELL_WORD_0 ((v), ((l) << 8) + 
(t)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]