diff options
| author | Tom Tromey | 2018-07-06 21:56:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 42fe787b0f26c2df682b2797407a669ef8522ccb (patch) | |
| tree | e944fe465e2b65703a8361bc82647faf4f7907f1 /src/dbusbind.c | |
| parent | 01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff) | |
| download | emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.gz emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.zip | |
Rename integerp->fixnum, etc, in preparation for bignums
* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 4ebea5712a8..ac3e0626000 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -201,8 +201,8 @@ xd_symbol_to_dbus_type (Lisp_Object object) | |||
| 201 | arguments to a D-Bus message. */ | 201 | arguments to a D-Bus message. */ |
| 202 | #define XD_OBJECT_TO_DBUS_TYPE(object) \ | 202 | #define XD_OBJECT_TO_DBUS_TYPE(object) \ |
| 203 | ((EQ (object, Qt) || EQ (object, Qnil)) ? DBUS_TYPE_BOOLEAN \ | 203 | ((EQ (object, Qt) || EQ (object, Qnil)) ? DBUS_TYPE_BOOLEAN \ |
| 204 | : (NATNUMP (object)) ? DBUS_TYPE_UINT32 \ | 204 | : (FIXNATP (object)) ? DBUS_TYPE_UINT32 \ |
| 205 | : (INTEGERP (object)) ? DBUS_TYPE_INT32 \ | 205 | : (FIXNUMP (object)) ? DBUS_TYPE_INT32 \ |
| 206 | : (FLOATP (object)) ? DBUS_TYPE_DOUBLE \ | 206 | : (FLOATP (object)) ? DBUS_TYPE_DOUBLE \ |
| 207 | : (STRINGP (object)) ? DBUS_TYPE_STRING \ | 207 | : (STRINGP (object)) ? DBUS_TYPE_STRING \ |
| 208 | : (XD_DBUS_TYPE_P (object)) ? xd_symbol_to_dbus_type (object) \ | 208 | : (XD_DBUS_TYPE_P (object)) ? xd_symbol_to_dbus_type (object) \ |
| @@ -355,7 +355,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) | |||
| 355 | { | 355 | { |
| 356 | case DBUS_TYPE_BYTE: | 356 | case DBUS_TYPE_BYTE: |
| 357 | case DBUS_TYPE_UINT16: | 357 | case DBUS_TYPE_UINT16: |
| 358 | CHECK_NATNUM (object); | 358 | CHECK_FIXNAT (object); |
| 359 | sprintf (signature, "%c", dtype); | 359 | sprintf (signature, "%c", dtype); |
| 360 | break; | 360 | break; |
| 361 | 361 | ||
| @@ -366,7 +366,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) | |||
| 366 | break; | 366 | break; |
| 367 | 367 | ||
| 368 | case DBUS_TYPE_INT16: | 368 | case DBUS_TYPE_INT16: |
| 369 | CHECK_NUMBER (object); | 369 | CHECK_FIXNUM (object); |
| 370 | sprintf (signature, "%c", dtype); | 370 | sprintf (signature, "%c", dtype); |
| 371 | break; | 371 | break; |
| 372 | 372 | ||
| @@ -378,7 +378,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) | |||
| 378 | case DBUS_TYPE_INT32: | 378 | case DBUS_TYPE_INT32: |
| 379 | case DBUS_TYPE_INT64: | 379 | case DBUS_TYPE_INT64: |
| 380 | case DBUS_TYPE_DOUBLE: | 380 | case DBUS_TYPE_DOUBLE: |
| 381 | CHECK_NUMBER_OR_FLOAT (object); | 381 | CHECK_FIXNUM_OR_FLOAT (object); |
| 382 | sprintf (signature, "%c", dtype); | 382 | sprintf (signature, "%c", dtype); |
| 383 | break; | 383 | break; |
| 384 | 384 | ||
| @@ -519,8 +519,8 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) | |||
| 519 | static intmax_t | 519 | static intmax_t |
| 520 | xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi) | 520 | xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi) |
| 521 | { | 521 | { |
| 522 | CHECK_NUMBER_OR_FLOAT (x); | 522 | CHECK_FIXNUM_OR_FLOAT (x); |
| 523 | if (INTEGERP (x)) | 523 | if (FIXNUMP (x)) |
| 524 | { | 524 | { |
| 525 | if (lo <= XINT (x) && XINT (x) <= hi) | 525 | if (lo <= XINT (x) && XINT (x) <= hi) |
| 526 | return XINT (x); | 526 | return XINT (x); |
| @@ -547,8 +547,8 @@ xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi) | |||
| 547 | static uintmax_t | 547 | static uintmax_t |
| 548 | xd_extract_unsigned (Lisp_Object x, uintmax_t hi) | 548 | xd_extract_unsigned (Lisp_Object x, uintmax_t hi) |
| 549 | { | 549 | { |
| 550 | CHECK_NUMBER_OR_FLOAT (x); | 550 | CHECK_FIXNUM_OR_FLOAT (x); |
| 551 | if (INTEGERP (x)) | 551 | if (FIXNUMP (x)) |
| 552 | { | 552 | { |
| 553 | if (0 <= XINT (x) && XINT (x) <= hi) | 553 | if (0 <= XINT (x) && XINT (x) <= hi) |
| 554 | return XINT (x); | 554 | return XINT (x); |
| @@ -566,7 +566,7 @@ xd_extract_unsigned (Lisp_Object x, uintmax_t hi) | |||
| 566 | if (xd_in_read_queued_messages) | 566 | if (xd_in_read_queued_messages) |
| 567 | Fthrow (Qdbus_error, Qnil); | 567 | Fthrow (Qdbus_error, Qnil); |
| 568 | else | 568 | else |
| 569 | args_out_of_range_3 (x, make_number (0), make_fixnum_or_float (hi)); | 569 | args_out_of_range_3 (x, make_fixnum (0), make_fixnum_or_float (hi)); |
| 570 | } | 570 | } |
| 571 | 571 | ||
| 572 | /* Append C value, extracted from Lisp OBJECT, to iteration ITER. | 572 | /* Append C value, extracted from Lisp OBJECT, to iteration ITER. |
| @@ -584,7 +584,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 584 | switch (dtype) | 584 | switch (dtype) |
| 585 | { | 585 | { |
| 586 | case DBUS_TYPE_BYTE: | 586 | case DBUS_TYPE_BYTE: |
| 587 | CHECK_NATNUM (object); | 587 | CHECK_FIXNAT (object); |
| 588 | { | 588 | { |
| 589 | unsigned char val = XFASTINT (object) & 0xFF; | 589 | unsigned char val = XFASTINT (object) & 0xFF; |
| 590 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); | 590 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); |
| @@ -750,7 +750,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 750 | if (!dbus_message_iter_open_container (iter, dtype, | 750 | if (!dbus_message_iter_open_container (iter, dtype, |
| 751 | signature, &subiter)) | 751 | signature, &subiter)) |
| 752 | XD_SIGNAL3 (build_string ("Cannot open container"), | 752 | XD_SIGNAL3 (build_string ("Cannot open container"), |
| 753 | make_number (dtype), build_string (signature)); | 753 | make_fixnum (dtype), build_string (signature)); |
| 754 | break; | 754 | break; |
| 755 | 755 | ||
| 756 | case DBUS_TYPE_VARIANT: | 756 | case DBUS_TYPE_VARIANT: |
| @@ -763,7 +763,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 763 | if (!dbus_message_iter_open_container (iter, dtype, | 763 | if (!dbus_message_iter_open_container (iter, dtype, |
| 764 | signature, &subiter)) | 764 | signature, &subiter)) |
| 765 | XD_SIGNAL3 (build_string ("Cannot open container"), | 765 | XD_SIGNAL3 (build_string ("Cannot open container"), |
| 766 | make_number (dtype), build_string (signature)); | 766 | make_fixnum (dtype), build_string (signature)); |
| 767 | break; | 767 | break; |
| 768 | 768 | ||
| 769 | case DBUS_TYPE_STRUCT: | 769 | case DBUS_TYPE_STRUCT: |
| @@ -772,7 +772,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 772 | XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (object)); | 772 | XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (object)); |
| 773 | if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter)) | 773 | if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter)) |
| 774 | XD_SIGNAL2 (build_string ("Cannot open container"), | 774 | XD_SIGNAL2 (build_string ("Cannot open container"), |
| 775 | make_number (dtype)); | 775 | make_fixnum (dtype)); |
| 776 | break; | 776 | break; |
| 777 | } | 777 | } |
| 778 | 778 | ||
| @@ -790,7 +790,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter) | |||
| 790 | /* Close the subiteration. */ | 790 | /* Close the subiteration. */ |
| 791 | if (!dbus_message_iter_close_container (iter, &subiter)) | 791 | if (!dbus_message_iter_close_container (iter, &subiter)) |
| 792 | XD_SIGNAL2 (build_string ("Cannot close container"), | 792 | XD_SIGNAL2 (build_string ("Cannot close container"), |
| 793 | make_number (dtype)); | 793 | make_fixnum (dtype)); |
| 794 | } | 794 | } |
| 795 | } | 795 | } |
| 796 | 796 | ||
| @@ -810,7 +810,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 810 | dbus_message_iter_get_basic (iter, &val); | 810 | dbus_message_iter_get_basic (iter, &val); |
| 811 | val = val & 0xFF; | 811 | val = val & 0xFF; |
| 812 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); | 812 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); |
| 813 | return make_number (val); | 813 | return make_fixnum (val); |
| 814 | } | 814 | } |
| 815 | 815 | ||
| 816 | case DBUS_TYPE_BOOLEAN: | 816 | case DBUS_TYPE_BOOLEAN: |
| @@ -828,7 +828,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 828 | dbus_message_iter_get_basic (iter, &val); | 828 | dbus_message_iter_get_basic (iter, &val); |
| 829 | pval = val; | 829 | pval = val; |
| 830 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); | 830 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); |
| 831 | return make_number (val); | 831 | return make_fixnum (val); |
| 832 | } | 832 | } |
| 833 | 833 | ||
| 834 | case DBUS_TYPE_UINT16: | 834 | case DBUS_TYPE_UINT16: |
| @@ -838,7 +838,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 838 | dbus_message_iter_get_basic (iter, &val); | 838 | dbus_message_iter_get_basic (iter, &val); |
| 839 | pval = val; | 839 | pval = val; |
| 840 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); | 840 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); |
| 841 | return make_number (val); | 841 | return make_fixnum (val); |
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | case DBUS_TYPE_INT32: | 844 | case DBUS_TYPE_INT32: |
| @@ -1200,7 +1200,7 @@ this connection to those buses. */) | |||
| 1200 | refcount = xd_get_connection_references (connection); | 1200 | refcount = xd_get_connection_references (connection); |
| 1201 | XD_DEBUG_MESSAGE ("Bus %s, Reference counter %"pD"d", | 1201 | XD_DEBUG_MESSAGE ("Bus %s, Reference counter %"pD"d", |
| 1202 | XD_OBJECT_TO_STRING (bus), refcount); | 1202 | XD_OBJECT_TO_STRING (bus), refcount); |
| 1203 | return make_number (refcount); | 1203 | return make_fixnum (refcount); |
| 1204 | } | 1204 | } |
| 1205 | 1205 | ||
| 1206 | DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name, | 1206 | DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name, |
| @@ -1275,7 +1275,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1275 | service = args[2]; | 1275 | service = args[2]; |
| 1276 | handler = Qnil; | 1276 | handler = Qnil; |
| 1277 | 1277 | ||
| 1278 | CHECK_NATNUM (message_type); | 1278 | CHECK_FIXNAT (message_type); |
| 1279 | if (! (DBUS_MESSAGE_TYPE_INVALID < XFASTINT (message_type) | 1279 | if (! (DBUS_MESSAGE_TYPE_INVALID < XFASTINT (message_type) |
| 1280 | && XFASTINT (message_type) < DBUS_NUM_MESSAGE_TYPES)) | 1280 | && XFASTINT (message_type) < DBUS_NUM_MESSAGE_TYPES)) |
| 1281 | XD_SIGNAL2 (build_string ("Invalid message type"), message_type); | 1281 | XD_SIGNAL2 (build_string ("Invalid message type"), message_type); |
| @@ -1303,7 +1303,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1303 | if (nargs < count) | 1303 | if (nargs < count) |
| 1304 | xsignal2 (Qwrong_number_of_arguments, | 1304 | xsignal2 (Qwrong_number_of_arguments, |
| 1305 | Qdbus_message_internal, | 1305 | Qdbus_message_internal, |
| 1306 | make_number (nargs)); | 1306 | make_fixnum (nargs)); |
| 1307 | 1307 | ||
| 1308 | if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) | 1308 | if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) |
| 1309 | || (mtype == DBUS_MESSAGE_TYPE_SIGNAL)) | 1309 | || (mtype == DBUS_MESSAGE_TYPE_SIGNAL)) |
| @@ -1409,7 +1409,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1409 | /* Check for timeout parameter. */ | 1409 | /* Check for timeout parameter. */ |
| 1410 | if ((count + 2 <= nargs) && EQ (args[count], QCtimeout)) | 1410 | if ((count + 2 <= nargs) && EQ (args[count], QCtimeout)) |
| 1411 | { | 1411 | { |
| 1412 | CHECK_NATNUM (args[count+1]); | 1412 | CHECK_FIXNAT (args[count+1]); |
| 1413 | timeout = min (XFASTINT (args[count+1]), INT_MAX); | 1413 | timeout = min (XFASTINT (args[count+1]), INT_MAX); |
| 1414 | count = count+2; | 1414 | count = count+2; |
| 1415 | } | 1415 | } |
| @@ -1609,7 +1609,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1609 | event.arg = Fcons ((uname == NULL ? Qnil : build_string (uname)), | 1609 | event.arg = Fcons ((uname == NULL ? Qnil : build_string (uname)), |
| 1610 | event.arg); | 1610 | event.arg); |
| 1611 | event.arg = Fcons (make_fixnum_or_float (serial), event.arg); | 1611 | event.arg = Fcons (make_fixnum_or_float (serial), event.arg); |
| 1612 | event.arg = Fcons (make_number (mtype), event.arg); | 1612 | event.arg = Fcons (make_fixnum (mtype), event.arg); |
| 1613 | 1613 | ||
| 1614 | /* Add the bus symbol to the event. */ | 1614 | /* Add the bus symbol to the event. */ |
| 1615 | event.arg = Fcons (bus, event.arg); | 1615 | event.arg = Fcons (bus, event.arg); |
| @@ -1754,28 +1754,28 @@ syms_of_dbusbind (void) | |||
| 1754 | DEFVAR_LISP ("dbus-message-type-invalid", | 1754 | DEFVAR_LISP ("dbus-message-type-invalid", |
| 1755 | Vdbus_message_type_invalid, | 1755 | Vdbus_message_type_invalid, |
| 1756 | doc: /* This value is never a valid message type. */); | 1756 | doc: /* This value is never a valid message type. */); |
| 1757 | Vdbus_message_type_invalid = make_number (DBUS_MESSAGE_TYPE_INVALID); | 1757 | Vdbus_message_type_invalid = make_fixnum (DBUS_MESSAGE_TYPE_INVALID); |
| 1758 | 1758 | ||
| 1759 | DEFVAR_LISP ("dbus-message-type-method-call", | 1759 | DEFVAR_LISP ("dbus-message-type-method-call", |
| 1760 | Vdbus_message_type_method_call, | 1760 | Vdbus_message_type_method_call, |
| 1761 | doc: /* Message type of a method call message. */); | 1761 | doc: /* Message type of a method call message. */); |
| 1762 | Vdbus_message_type_method_call = make_number (DBUS_MESSAGE_TYPE_METHOD_CALL); | 1762 | Vdbus_message_type_method_call = make_fixnum (DBUS_MESSAGE_TYPE_METHOD_CALL); |
| 1763 | 1763 | ||
| 1764 | DEFVAR_LISP ("dbus-message-type-method-return", | 1764 | DEFVAR_LISP ("dbus-message-type-method-return", |
| 1765 | Vdbus_message_type_method_return, | 1765 | Vdbus_message_type_method_return, |
| 1766 | doc: /* Message type of a method return message. */); | 1766 | doc: /* Message type of a method return message. */); |
| 1767 | Vdbus_message_type_method_return | 1767 | Vdbus_message_type_method_return |
| 1768 | = make_number (DBUS_MESSAGE_TYPE_METHOD_RETURN); | 1768 | = make_fixnum (DBUS_MESSAGE_TYPE_METHOD_RETURN); |
| 1769 | 1769 | ||
| 1770 | DEFVAR_LISP ("dbus-message-type-error", | 1770 | DEFVAR_LISP ("dbus-message-type-error", |
| 1771 | Vdbus_message_type_error, | 1771 | Vdbus_message_type_error, |
| 1772 | doc: /* Message type of an error reply message. */); | 1772 | doc: /* Message type of an error reply message. */); |
| 1773 | Vdbus_message_type_error = make_number (DBUS_MESSAGE_TYPE_ERROR); | 1773 | Vdbus_message_type_error = make_fixnum (DBUS_MESSAGE_TYPE_ERROR); |
| 1774 | 1774 | ||
| 1775 | DEFVAR_LISP ("dbus-message-type-signal", | 1775 | DEFVAR_LISP ("dbus-message-type-signal", |
| 1776 | Vdbus_message_type_signal, | 1776 | Vdbus_message_type_signal, |
| 1777 | doc: /* Message type of a signal message. */); | 1777 | doc: /* Message type of a signal message. */); |
| 1778 | Vdbus_message_type_signal = make_number (DBUS_MESSAGE_TYPE_SIGNAL); | 1778 | Vdbus_message_type_signal = make_fixnum (DBUS_MESSAGE_TYPE_SIGNAL); |
| 1779 | 1779 | ||
| 1780 | DEFVAR_LISP ("dbus-registered-objects-table", | 1780 | DEFVAR_LISP ("dbus-registered-objects-table", |
| 1781 | Vdbus_registered_objects_table, | 1781 | Vdbus_registered_objects_table, |