Mercurial > hg > xemacs-beta
changeset 616:4f1c7a4ac1e6
[xemacs-hg @ 2001-06-11 07:47:11 by martinb]
Revert to doing type-checking in DFC_* macros
author | martinb |
---|---|
date | Mon, 11 Jun 2001 07:47:20 +0000 |
parents | 4f50f8a33f96 |
children | af57a77cbc92 |
files | src/ChangeLog src/buffer.h src/sound.h |
diffstat | 3 files changed, 20 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Jun 11 04:44:52 2001 +0000 +++ b/src/ChangeLog Mon Jun 11 07:47:20 2001 +0000 @@ -1,3 +1,12 @@ +2001-06-11 Martin Buchholz <martin@xemacs.org> + + * buffer.h (DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA): + * buffer.h (DFC_C_STRING_MALLOC_USE_CONVERTED_DATA): + Revert to doing type-checking on `sink'. + + * sound.h (sound_perror): Bufbyte -> CBufbyte + * sound.h (sound_warn): Bufbyte -> CBufbyte + 2001-06-12 Martin Buchholz <martin@xemacs.org> * config.h.in (alloca): All feature test macros must be defined
--- a/src/buffer.h Mon Jun 11 04:44:52 2001 +0000 +++ b/src/buffer.h Mon Jun 11 07:47:20 2001 +0000 @@ -1284,12 +1284,12 @@ #define DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA(sink) do { \ void * dfc_sink_ret = alloca (dfc_sink.data.len + 1); \ memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \ - ((dfc_aliasing_voidpp) &(sink))->p = dfc_sink_ret; \ + sink = (char *) dfc_sink_ret; \ } while (0) #define DFC_C_STRING_MALLOC_USE_CONVERTED_DATA(sink) do { \ void * dfc_sink_ret = xmalloc (dfc_sink.data.len + 1); \ memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \ - ((dfc_aliasing_voidpp) &(sink))->p = dfc_sink_ret; \ + sink = (char *) dfc_sink_ret; \ } while (0) #define DFC_LISP_STRING_USE_CONVERTED_DATA(sink) \ sink = make_string ((Bufbyte *) dfc_sink.data.ptr, dfc_sink.data.len)
--- a/src/sound.h Mon Jun 11 04:44:52 2001 +0000 +++ b/src/sound.h Mon Jun 11 07:47:20 2001 +0000 @@ -29,18 +29,18 @@ void play_sound_file (Extbyte *name, int volume); int play_sound_data (UChar_Binary *data, int length, int volume); -# define sound_perror(string) \ -do { \ - Bufbyte *errmess; \ - Bufbyte *string_int; \ - /* #### fix this to GET_STRERROR in my mule ws */ \ - EXTERNAL_TO_C_STRING (strerror (errno), errmess, Qnative); \ - EXTERNAL_TO_C_STRING (string, string_int, Qnative); \ - warn_when_safe (Qsound, Qerror, "audio: %s, %s", string_int, errmess); \ +# define sound_perror(string) \ +do { \ + CBufbyte *errmess; \ + CBufbyte *string_int; \ + /* #### fix this to GET_STRERROR in my mule ws */ \ + EXTERNAL_TO_C_STRING (strerror (errno), errmess, Qnative); \ + EXTERNAL_TO_C_STRING (string, string_int, Qnative); \ + warn_when_safe (Qsound, Qerror, "audio: %s, %s", string_int, errmess); \ } while (0) # define sound_warn(string) \ do { \ - Bufbyte *string_int; \ + CBufbyte *string_int; \ EXTERNAL_TO_C_STRING (GETTEXT (string), string_int, Qnative); \ warn_when_safe (Qsound, Qwarning, "audio: %s", string_int); \ } while (0)