]> git.eshelyaron.com Git - emacs.git/commitdiff
Port recent module changes to pickier compilers
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2015 17:53:13 +0000 (09:53 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Nov 2015 17:53:36 +0000 (09:53 -0800)
* src/emacs-module.c (module_make_function)
(module_make_string): Add casts to fix pointer signedness issues.

src/emacs-module.c

index f49802c2819b7c2f8db7022a303dc34daaa5e4eb..643633935ca39f76f4cf913de13872f6254ccf6e 100644 (file)
@@ -394,7 +394,8 @@ module_make_function (emacs_env *env, ptrdiff_t min_arity, ptrdiff_t max_arity,
     {
       ptrdiff_t nbytes = strlen (documentation);
       ptrdiff_t nchars, ignored_nbytes;
-      parse_str_as_multibyte (documentation, nbytes, &nchars, &ignored_nbytes);
+      parse_str_as_multibyte ((unsigned char const *) documentation, nbytes,
+                             &nchars, &ignored_nbytes);
       doc = make_multibyte_string (documentation, nchars, nbytes);
     }
 
@@ -572,7 +573,8 @@ module_make_string (emacs_env *env, const char *str, ptrdiff_t length)
       return NULL;
     }
   ptrdiff_t nchars, ignored_nbytes;
-  parse_str_as_multibyte (str, length, &nchars, &ignored_nbytes);
+  parse_str_as_multibyte ((unsigned char const *) str, length,
+                         &nchars, &ignored_nbytes);
   return lisp_to_value (env, make_multibyte_string (str, nchars, length));
 }