]> code.delx.au - gnu-emacs/blobdiff - src/charset.c
Merge from emacs-24; up to 2012-04-24T21:47:24Z!michael.albinus@gmx.de
[gnu-emacs] / src / charset.c
index 6ecc8d2c4d117e170af97e2a1cfdb5dc098942ee..8ce972ebf377f73029892d17cdd6561cbbd7cdd8 100644 (file)
@@ -1633,6 +1633,12 @@ maybe_unify_char (int c, Lisp_Object val)
     return c;
 
   CHECK_CHARSET_GET_CHARSET (val, charset);
+#ifdef REL_ALLOC
+  /* The call to load_charset below can allocate memory, which screws
+     callers of this function through STRING_CHAR_* macros that hold C
+     pointers to buffer text, if REL_ALLOC is used.  */
+  r_alloc_inhibit_buffer_relocation (1);
+#endif
   load_charset (charset, 1);
   if (! inhibit_load_charset_map)
     {
@@ -1648,6 +1654,9 @@ maybe_unify_char (int c, Lisp_Object val)
       if (unified > 0)
        c = unified;
     }
+#ifdef REL_ALLOC
+  r_alloc_inhibit_buffer_relocation (0);
+#endif
   return c;
 }