diff options
| author | Paul Eggert | 2014-06-24 01:10:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-06-24 01:10:48 -0700 |
| commit | 40f5d4b76087eb5808ea228fc490b86cb9d85235 (patch) | |
| tree | 0214650f2d1d1712a494319aebbf1977db2eac50 /src | |
| parent | 7967f7d1d44a1c8e1b077fa186d43a86c72f5d95 (diff) | |
| download | emacs-40f5d4b76087eb5808ea228fc490b86cb9d85235.tar.gz emacs-40f5d4b76087eb5808ea228fc490b86cb9d85235.zip | |
Be more consistent about the 'Qfoo' naming convention.
* image.c (Fimagemagick_types):
* lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
* process.c (Fmake_network_process):
Rename C local identifier 'Qfoo to avoid giving the false
impression that it stands for the symbol 'foo'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/image.c | 5 | ||||
| -rw-r--r-- | src/lisp.h | 15 | ||||
| -rw-r--r-- | src/process.c | 10 |
4 files changed, 24 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0fc0401265c..9f676a6518d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-06-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Be more consistent about the 'Qfoo' naming convention. | ||
| 4 | * image.c (Fimagemagick_types): | ||
| 5 | * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY): | ||
| 6 | * process.c (Fmake_network_process): | ||
| 7 | Rename C local identifier 'Qfoo to avoid giving the false | ||
| 8 | impression that it stands for the symbol 'foo'. | ||
| 9 | |||
| 1 | 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru> | 10 | 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 11 | ||
| 3 | Simplify and cleanup character conversion stuff. | 12 | Simplify and cleanup character conversion stuff. |
diff --git a/src/image.c b/src/image.c index f8c2402bfc4..b6d1f81ca06 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8549,7 +8549,6 @@ and `imagemagick-types-inhibit'. */) | |||
| 8549 | ExceptionInfo ex; | 8549 | ExceptionInfo ex; |
| 8550 | char **imtypes; | 8550 | char **imtypes; |
| 8551 | size_t i; | 8551 | size_t i; |
| 8552 | Lisp_Object Qimagemagicktype; | ||
| 8553 | 8552 | ||
| 8554 | GetExceptionInfo(&ex); | 8553 | GetExceptionInfo(&ex); |
| 8555 | imtypes = GetMagickList ("*", &numf, &ex); | 8554 | imtypes = GetMagickList ("*", &numf, &ex); |
| @@ -8557,8 +8556,8 @@ and `imagemagick-types-inhibit'. */) | |||
| 8557 | 8556 | ||
| 8558 | for (i = 0; i < numf; i++) | 8557 | for (i = 0; i < numf; i++) |
| 8559 | { | 8558 | { |
| 8560 | Qimagemagicktype = intern (imtypes[i]); | 8559 | Lisp_Object imagemagicktype = intern (imtypes[i]); |
| 8561 | typelist = Fcons (Qimagemagicktype, typelist); | 8560 | typelist = Fcons (imagemagicktype, typelist); |
| 8562 | imtypes[i] = MagickRelinquishMemory (imtypes[i]); | 8561 | imtypes[i] = MagickRelinquishMemory (imtypes[i]); |
| 8563 | } | 8562 | } |
| 8564 | 8563 | ||
diff --git a/src/lisp.h b/src/lisp.h index 0b9d3565433..2c53282cf14 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -341,8 +341,8 @@ error !; | |||
| 341 | #define lisp_h_CHECK_LIST_CONS(x, y) CHECK_TYPE (CONSP (x), Qlistp, y) | 341 | #define lisp_h_CHECK_LIST_CONS(x, y) CHECK_TYPE (CONSP (x), Qlistp, y) |
| 342 | #define lisp_h_CHECK_NUMBER(x) CHECK_TYPE (INTEGERP (x), Qintegerp, x) | 342 | #define lisp_h_CHECK_NUMBER(x) CHECK_TYPE (INTEGERP (x), Qintegerp, x) |
| 343 | #define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x) | 343 | #define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x) |
| 344 | #define lisp_h_CHECK_TYPE(ok, Qxxxp, x) \ | 344 | #define lisp_h_CHECK_TYPE(ok, predicate, x) \ |
| 345 | ((ok) ? (void) 0 : (void) wrong_type_argument (Qxxxp, x)) | 345 | ((ok) ? (void) 0 : (void) wrong_type_argument (predicate, x)) |
| 346 | #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons) | 346 | #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons) |
| 347 | #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) | 347 | #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) |
| 348 | #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float) | 348 | #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float) |
| @@ -388,7 +388,7 @@ error !; | |||
| 388 | # define CHECK_LIST_CONS(x, y) lisp_h_CHECK_LIST_CONS (x, y) | 388 | # define CHECK_LIST_CONS(x, y) lisp_h_CHECK_LIST_CONS (x, y) |
| 389 | # define CHECK_NUMBER(x) lisp_h_CHECK_NUMBER (x) | 389 | # define CHECK_NUMBER(x) lisp_h_CHECK_NUMBER (x) |
| 390 | # define CHECK_SYMBOL(x) lisp_h_CHECK_SYMBOL (x) | 390 | # define CHECK_SYMBOL(x) lisp_h_CHECK_SYMBOL (x) |
| 391 | # define CHECK_TYPE(ok, Qxxxp, x) lisp_h_CHECK_TYPE (ok, Qxxxp, x) | 391 | # define CHECK_TYPE(ok, predicate, x) lisp_h_CHECK_TYPE (ok, predicate, x) |
| 392 | # define CONSP(x) lisp_h_CONSP (x) | 392 | # define CONSP(x) lisp_h_CONSP (x) |
| 393 | # define EQ(x, y) lisp_h_EQ (x, y) | 393 | # define EQ(x, y) lisp_h_EQ (x, y) |
| 394 | # define FLOATP(x) lisp_h_FLOATP (x) | 394 | # define FLOATP(x) lisp_h_FLOATP (x) |
| @@ -1003,8 +1003,9 @@ make_lisp_proc (struct Lisp_Process *p) | |||
| 1003 | 1003 | ||
| 1004 | /* Type checking. */ | 1004 | /* Type checking. */ |
| 1005 | 1005 | ||
| 1006 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, (int ok, Lisp_Object Qxxxp, Lisp_Object x), | 1006 | LISP_MACRO_DEFUN_VOID (CHECK_TYPE, |
| 1007 | (ok, Qxxxp, x)) | 1007 | (int ok, Lisp_Object predicate, Lisp_Object x), |
| 1008 | (ok, predicate, x)) | ||
| 1008 | 1009 | ||
| 1009 | /* Deprecated and will be removed soon. */ | 1010 | /* Deprecated and will be removed soon. */ |
| 1010 | 1011 | ||
| @@ -2552,9 +2553,9 @@ CHECK_VECTOR_OR_STRING (Lisp_Object x) | |||
| 2552 | CHECK_TYPE (VECTORP (x) || STRINGP (x), Qarrayp, x); | 2553 | CHECK_TYPE (VECTORP (x) || STRINGP (x), Qarrayp, x); |
| 2553 | } | 2554 | } |
| 2554 | INLINE void | 2555 | INLINE void |
| 2555 | CHECK_ARRAY (Lisp_Object x, Lisp_Object Qxxxp) | 2556 | CHECK_ARRAY (Lisp_Object x, Lisp_Object predicate) |
| 2556 | { | 2557 | { |
| 2557 | CHECK_TYPE (ARRAYP (x), Qxxxp, x); | 2558 | CHECK_TYPE (ARRAYP (x), predicate, x); |
| 2558 | } | 2559 | } |
| 2559 | INLINE void | 2560 | INLINE void |
| 2560 | CHECK_BUFFER (Lisp_Object x) | 2561 | CHECK_BUFFER (Lisp_Object x) |
diff --git a/src/process.c b/src/process.c index 592c43acc2d..3242222a94a 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2844,7 +2844,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2844 | struct gcpro gcpro1; | 2844 | struct gcpro gcpro1; |
| 2845 | ptrdiff_t count = SPECPDL_INDEX (); | 2845 | ptrdiff_t count = SPECPDL_INDEX (); |
| 2846 | ptrdiff_t count1; | 2846 | ptrdiff_t count1; |
| 2847 | Lisp_Object QCaddress; /* one of QClocal or QCremote */ | 2847 | Lisp_Object colon_address; /* Either QClocal or QCremote. */ |
| 2848 | Lisp_Object tem; | 2848 | Lisp_Object tem; |
| 2849 | Lisp_Object name, buffer, host, service, address; | 2849 | Lisp_Object name, buffer, host, service, address; |
| 2850 | Lisp_Object filter, sentinel; | 2850 | Lisp_Object filter, sentinel; |
| @@ -2892,8 +2892,8 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2892 | backlog = XINT (tem); | 2892 | backlog = XINT (tem); |
| 2893 | } | 2893 | } |
| 2894 | 2894 | ||
| 2895 | /* Make QCaddress an alias for :local (server) or :remote (client). */ | 2895 | /* Make colon_address an alias for :local (server) or :remote (client). */ |
| 2896 | QCaddress = is_server ? QClocal : QCremote; | 2896 | colon_address = is_server ? QClocal : QCremote; |
| 2897 | 2897 | ||
| 2898 | /* :nowait BOOL */ | 2898 | /* :nowait BOOL */ |
| 2899 | if (!is_server && socktype != SOCK_DGRAM | 2899 | if (!is_server && socktype != SOCK_DGRAM |
| @@ -2920,7 +2920,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2920 | res = &ai; | 2920 | res = &ai; |
| 2921 | 2921 | ||
| 2922 | /* :local ADDRESS or :remote ADDRESS */ | 2922 | /* :local ADDRESS or :remote ADDRESS */ |
| 2923 | address = Fplist_get (contact, QCaddress); | 2923 | address = Fplist_get (contact, colon_address); |
| 2924 | if (!NILP (address)) | 2924 | if (!NILP (address)) |
| 2925 | { | 2925 | { |
| 2926 | host = service = Qnil; | 2926 | host = service = Qnil; |
| @@ -3307,7 +3307,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3307 | memcpy (datagram_address[s].sa, lres->ai_addr, lres->ai_addrlen); | 3307 | memcpy (datagram_address[s].sa, lres->ai_addr, lres->ai_addrlen); |
| 3308 | } | 3308 | } |
| 3309 | #endif | 3309 | #endif |
| 3310 | contact = Fplist_put (contact, QCaddress, | 3310 | contact = Fplist_put (contact, colon_address, |
| 3311 | conv_sockaddr_to_lisp (lres->ai_addr, lres->ai_addrlen)); | 3311 | conv_sockaddr_to_lisp (lres->ai_addr, lres->ai_addrlen)); |
| 3312 | #ifdef HAVE_GETSOCKNAME | 3312 | #ifdef HAVE_GETSOCKNAME |
| 3313 | if (!is_server) | 3313 | if (!is_server) |