diff src/symbols.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents fdefd0186b75
children e38acbeb1cae
line wrap: on
line diff
--- a/src/symbols.c	Fri Mar 08 13:33:14 2002 +0000
+++ b/src/symbols.c	Wed Mar 13 08:54:06 2002 +0000
@@ -1,6 +1,6 @@
 /* "intern" and friends -- moved here from lread.c and data.c
    Copyright (C) 1985-1989, 1992-1994 Free Software Foundation, Inc.
-   Copyright (C) 1995, 2000 Ben Wing.
+   Copyright (C) 1995, 2000, 2001 Ben Wing.
 
 This file is part of XEmacs.
 
@@ -177,22 +177,27 @@
 }
 
 Lisp_Object
-intern (const char *str)
+intern_int (const Intbyte *str)
 {
-  Bytecount len = strlen (str);
-  const Intbyte *buf = (const Intbyte *) str;
+  Bytecount len = qxestrlen (str);
   Lisp_Object obarray = Vobarray;
 
   if (!VECTORP (obarray) || XVECTOR_LENGTH (obarray) == 0)
     obarray = check_obarray (obarray);
 
   {
-    Lisp_Object tem = oblookup (obarray, buf, len);
+    Lisp_Object tem = oblookup (obarray, str, len);
     if (SYMBOLP (tem))
       return tem;
   }
 
-  return Fintern (make_string (buf, len), obarray);
+  return Fintern (make_string (str, len), obarray);
+}
+
+Lisp_Object
+intern (const CIntbyte *str)
+{
+  return intern_int ((Intbyte *) str);
 }
 
 DEFUN ("intern", Fintern, 1, 2, 0, /*
@@ -1135,7 +1140,7 @@
 	  if (!(b->local_var_flags & mask))
 	    {
 	      if (magicfun)
-		magicfun (sym, &value, make_buffer (b), 0);
+		magicfun (sym, &value, wrap_buffer (b), 0);
 	      *((Lisp_Object *) (offset + (char *) b)) = value;
 	    }
 	}
@@ -1252,7 +1257,7 @@
 
 	case SYMVAL_CURRENT_BUFFER_FORWARD:
 	  if (magicfun)
-	    magicfun (sym, &newval, make_buffer (current_buffer), 0);
+	    magicfun (sym, &newval, wrap_buffer (current_buffer), 0);
 	  *((Lisp_Object *) ((char *) current_buffer
 			     + ((char *) symbol_value_forward_forward (fwd)
 				- (char *) &buffer_local_flags)))
@@ -2379,7 +2384,7 @@
 	    Lisp_Object oldval = * (Lisp_Object *)
 	      (offset + (char *) XBUFFER (Vbuffer_defaults));
 	    if (magicfun)
-	      (magicfun) (variable, &oldval, make_buffer (current_buffer), 0);
+	      (magicfun) (variable, &oldval, wrap_buffer (current_buffer), 0);
 	    *(Lisp_Object *) (offset + (char *) current_buffer)
 	      = oldval;
 	    current_buffer->local_var_flags &= ~mask;
@@ -3254,15 +3259,6 @@
 void
 reinit_symbols_once_early (void)
 {
-#ifndef Qzero
-  Qzero = make_int (0);	/* Only used if Lisp_Object is a union type */
-#endif
-
-#ifndef Qnull_pointer
-  /* C guarantees that Qnull_pointer will be initialized to all 0 bits,
-     so the following is actually a no-op.  */
-  XSETOBJ (Qnull_pointer, 0);
-#endif
 }
 
 static void
@@ -3457,10 +3453,10 @@
   assert (SYMBOLP (inherits_from));
   conds = Fget (inherits_from, Qerror_conditions, Qnil);
   Fput (*symbol, Qerror_conditions, Fcons (*symbol, conds));
-  /* NOT build_translated_string ().  This function is called at load time
+  /* NOT build_msg_string ().  This function is called at load time
      and the string needs to get translated at run time.  (This happens
      in the function (display-error) in cmdloop.el.) */
-  Fput (*symbol, Qerror_message, build_string (messuhhj));
+  Fput (*symbol, Qerror_message, build_msg_string (messuhhj));
 }
 
 void