changeset 46472:c246e05b9c70

(intern, oblookup, hash_string): String pointer args now point to const. (complete_filename_p, openp): Use const for pointer to lisp string data.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 16 Jul 2002 19:48:47 +0000
parents 028a5b2de9e4
children a3056dbb032b
files src/lread.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Tue Jul 16 19:48:42 2002 +0000
+++ b/src/lread.c	Tue Jul 16 19:48:47 2002 +0000
@@ -958,7 +958,7 @@
 complete_filename_p (pathname)
      Lisp_Object pathname;
 {
-  register unsigned char *s = SDATA (pathname);
+  register const unsigned char *s = SDATA (pathname);
   return (IS_DIRECTORY_SEP (s[0])
 	  || (SCHARS (pathname) > 2
 	      && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))
@@ -1122,7 +1122,7 @@
 	    }
 	  else
 	    {
-	      char *pfn;
+	      const char *pfn;
 
 	      encoded_fn = ENCODE_FILE (string);
 	      pfn = SDATA (encoded_fn);
@@ -2973,7 +2973,6 @@
 int oblookup_last_bucket_number;
 
 static int hash_string ();
-Lisp_Object oblookup ();
 
 /* Get an error if OBARRAY is not an obarray.
    If it is one, return it.  */
@@ -2997,7 +2996,7 @@
 
 Lisp_Object
 intern (str)
-     char *str;
+     const char *str;
 {
   Lisp_Object tem;
   int len = strlen (str);
@@ -3174,7 +3173,7 @@
 Lisp_Object
 oblookup (obarray, ptr, size, size_byte)
      Lisp_Object obarray;
-     register char *ptr;
+     register const char *ptr;
      int size, size_byte;
 {
   int hash;
@@ -3215,11 +3214,11 @@
 
 static int
 hash_string (ptr, len)
-     unsigned char *ptr;
+     const unsigned char *ptr;
      int len;
 {
-  register unsigned char *p = ptr;
-  register unsigned char *end = p + len;
+  register const unsigned char *p = ptr;
+  register const unsigned char *end = p + len;
   register unsigned char c;
   register int hash = 0;