diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/lisp.h b/src/lisp.h index c414513afe2..2ed70c9c228 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -589,7 +589,7 @@ struct interval | |||
| 589 | typedef struct interval *INTERVAL; | 589 | typedef struct interval *INTERVAL; |
| 590 | 590 | ||
| 591 | /* Complain if object is not string or buffer type */ | 591 | /* Complain if object is not string or buffer type */ |
| 592 | #define CHECK_STRING_OR_BUFFER(x, i) \ | 592 | #define CHECK_STRING_OR_BUFFER(x) \ |
| 593 | { if (!STRINGP ((x)) && !BUFFERP ((x))) \ | 593 | { if (!STRINGP ((x)) && !BUFFERP ((x))) \ |
| 594 | x = wrong_type_argument (Qbuffer_or_string_p, (x)); } | 594 | x = wrong_type_argument (Qbuffer_or_string_p, (x)); } |
| 595 | 595 | ||
| @@ -1003,7 +1003,7 @@ struct Lisp_Hash_Table | |||
| 1003 | #define HASH_TABLE_P(OBJ) PSEUDOVECTORP (OBJ, PVEC_HASH_TABLE) | 1003 | #define HASH_TABLE_P(OBJ) PSEUDOVECTORP (OBJ, PVEC_HASH_TABLE) |
| 1004 | #define GC_HASH_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_HASH_TABLE) | 1004 | #define GC_HASH_TABLE_P(x) GC_PSEUDOVECTORP (x, PVEC_HASH_TABLE) |
| 1005 | 1005 | ||
| 1006 | #define CHECK_HASH_TABLE(x, i) \ | 1006 | #define CHECK_HASH_TABLE(x) \ |
| 1007 | do \ | 1007 | do \ |
| 1008 | { \ | 1008 | { \ |
| 1009 | if (!HASH_TABLE_P ((x))) \ | 1009 | if (!HASH_TABLE_P ((x))) \ |
| @@ -1416,34 +1416,34 @@ typedef unsigned char UCHAR; | |||
| 1416 | #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) | 1416 | #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) |
| 1417 | #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) | 1417 | #define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) |
| 1418 | 1418 | ||
| 1419 | #define CHECK_LIST(x, i) \ | 1419 | #define CHECK_LIST(x) \ |
| 1420 | do { if (!CONSP ((x)) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); } while (0) | 1420 | do { if (!CONSP ((x)) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); } while (0) |
| 1421 | 1421 | ||
| 1422 | #define CHECK_STRING(x, i) \ | 1422 | #define CHECK_STRING(x) \ |
| 1423 | do { if (!STRINGP ((x))) x = wrong_type_argument (Qstringp, (x)); } while (0) | 1423 | do { if (!STRINGP ((x))) x = wrong_type_argument (Qstringp, (x)); } while (0) |
| 1424 | 1424 | ||
| 1425 | #define CHECK_CONS(x, i) \ | 1425 | #define CHECK_CONS(x) \ |
| 1426 | do { if (!CONSP ((x))) x = wrong_type_argument (Qconsp, (x)); } while (0) | 1426 | do { if (!CONSP ((x))) x = wrong_type_argument (Qconsp, (x)); } while (0) |
| 1427 | 1427 | ||
| 1428 | #define CHECK_SYMBOL(x, i) \ | 1428 | #define CHECK_SYMBOL(x) \ |
| 1429 | do { if (!SYMBOLP ((x))) x = wrong_type_argument (Qsymbolp, (x)); } while (0) | 1429 | do { if (!SYMBOLP ((x))) x = wrong_type_argument (Qsymbolp, (x)); } while (0) |
| 1430 | 1430 | ||
| 1431 | #define CHECK_CHAR_TABLE(x, i) \ | 1431 | #define CHECK_CHAR_TABLE(x) \ |
| 1432 | do { if (!CHAR_TABLE_P ((x))) \ | 1432 | do { if (!CHAR_TABLE_P ((x))) \ |
| 1433 | x = wrong_type_argument (Qchar_table_p, (x)); } while (0) | 1433 | x = wrong_type_argument (Qchar_table_p, (x)); } while (0) |
| 1434 | 1434 | ||
| 1435 | #define CHECK_VECTOR(x, i) \ | 1435 | #define CHECK_VECTOR(x) \ |
| 1436 | do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0) | 1436 | do { if (!VECTORP ((x))) x = wrong_type_argument (Qvectorp, (x)); } while (0) |
| 1437 | 1437 | ||
| 1438 | #define CHECK_VECTOR_OR_CHAR_TABLE(x, i) \ | 1438 | #define CHECK_VECTOR_OR_CHAR_TABLE(x) \ |
| 1439 | do { if (!VECTORP ((x)) && !CHAR_TABLE_P ((x))) \ | 1439 | do { if (!VECTORP ((x)) && !CHAR_TABLE_P ((x))) \ |
| 1440 | x = wrong_type_argument (Qvector_or_char_table_p, (x)); \ | 1440 | x = wrong_type_argument (Qvector_or_char_table_p, (x)); \ |
| 1441 | } while (0) | 1441 | } while (0) |
| 1442 | 1442 | ||
| 1443 | #define CHECK_BUFFER(x, i) \ | 1443 | #define CHECK_BUFFER(x) \ |
| 1444 | do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0) | 1444 | do { if (!BUFFERP ((x))) x = wrong_type_argument (Qbufferp, (x)); } while (0) |
| 1445 | 1445 | ||
| 1446 | #define CHECK_WINDOW(x, i) \ | 1446 | #define CHECK_WINDOW(x) \ |
| 1447 | do { if (!WINDOWP ((x))) x = wrong_type_argument (Qwindowp, (x)); } while (0) | 1447 | do { if (!WINDOWP ((x))) x = wrong_type_argument (Qwindowp, (x)); } while (0) |
| 1448 | 1448 | ||
| 1449 | /* This macro rejects windows on the interior of the window tree as | 1449 | /* This macro rejects windows on the interior of the window tree as |
| @@ -1453,60 +1453,60 @@ typedef unsigned char UCHAR; | |||
| 1453 | A window of any sort, leaf or interior, is dead iff the buffer, | 1453 | A window of any sort, leaf or interior, is dead iff the buffer, |
| 1454 | vchild, and hchild members are all nil. */ | 1454 | vchild, and hchild members are all nil. */ |
| 1455 | 1455 | ||
| 1456 | #define CHECK_LIVE_WINDOW(x, i) \ | 1456 | #define CHECK_LIVE_WINDOW(x) \ |
| 1457 | do { \ | 1457 | do { \ |
| 1458 | if (!WINDOWP ((x)) \ | 1458 | if (!WINDOWP ((x)) \ |
| 1459 | || NILP (XWINDOW ((x))->buffer)) \ | 1459 | || NILP (XWINDOW ((x))->buffer)) \ |
| 1460 | x = wrong_type_argument (Qwindow_live_p, (x)); \ | 1460 | x = wrong_type_argument (Qwindow_live_p, (x)); \ |
| 1461 | } while (0) | 1461 | } while (0) |
| 1462 | 1462 | ||
| 1463 | #define CHECK_PROCESS(x, i) \ | 1463 | #define CHECK_PROCESS(x) \ |
| 1464 | do { if (!PROCESSP ((x))) x = wrong_type_argument (Qprocessp, (x)); } while (0) | 1464 | do { if (!PROCESSP ((x))) x = wrong_type_argument (Qprocessp, (x)); } while (0) |
| 1465 | 1465 | ||
| 1466 | #define CHECK_NUMBER(x, i) \ | 1466 | #define CHECK_NUMBER(x) \ |
| 1467 | do { if (!INTEGERP ((x))) x = wrong_type_argument (Qintegerp, (x)); } while (0) | 1467 | do { if (!INTEGERP ((x))) x = wrong_type_argument (Qintegerp, (x)); } while (0) |
| 1468 | 1468 | ||
| 1469 | #define CHECK_NATNUM(x, i) \ | 1469 | #define CHECK_NATNUM(x) \ |
| 1470 | do { if (!NATNUMP (x)) x = wrong_type_argument (Qwholenump, (x)); } while (0) | 1470 | do { if (!NATNUMP (x)) x = wrong_type_argument (Qwholenump, (x)); } while (0) |
| 1471 | 1471 | ||
| 1472 | #define CHECK_MARKER(x, i) \ | 1472 | #define CHECK_MARKER(x) \ |
| 1473 | do { if (!MARKERP ((x))) x = wrong_type_argument (Qmarkerp, (x)); } while (0) | 1473 | do { if (!MARKERP ((x))) x = wrong_type_argument (Qmarkerp, (x)); } while (0) |
| 1474 | 1474 | ||
| 1475 | #define CHECK_NUMBER_COERCE_MARKER(x, i) \ | 1475 | #define CHECK_NUMBER_COERCE_MARKER(x) \ |
| 1476 | do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \ | 1476 | do { if (MARKERP ((x))) XSETFASTINT (x, marker_position (x)); \ |
| 1477 | else if (!INTEGERP ((x))) x = wrong_type_argument (Qinteger_or_marker_p, (x)); } while (0) | 1477 | else if (!INTEGERP ((x))) x = wrong_type_argument (Qinteger_or_marker_p, (x)); } while (0) |
| 1478 | 1478 | ||
| 1479 | #define XFLOATINT(n) extract_float((n)) | 1479 | #define XFLOATINT(n) extract_float((n)) |
| 1480 | 1480 | ||
| 1481 | #define CHECK_FLOAT(x, i) \ | 1481 | #define CHECK_FLOAT(x) \ |
| 1482 | do { if (!FLOATP (x)) \ | 1482 | do { if (!FLOATP (x)) \ |
| 1483 | x = wrong_type_argument (Qfloatp, (x)); } while (0) | 1483 | x = wrong_type_argument (Qfloatp, (x)); } while (0) |
| 1484 | 1484 | ||
| 1485 | #define CHECK_NUMBER_OR_FLOAT(x, i) \ | 1485 | #define CHECK_NUMBER_OR_FLOAT(x) \ |
| 1486 | do { if (!FLOATP (x) && !INTEGERP (x)) \ | 1486 | do { if (!FLOATP (x) && !INTEGERP (x)) \ |
| 1487 | x = wrong_type_argument (Qnumberp, (x)); } while (0) | 1487 | x = wrong_type_argument (Qnumberp, (x)); } while (0) |
| 1488 | 1488 | ||
| 1489 | #define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \ | 1489 | #define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x) \ |
| 1490 | do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x)); \ | 1490 | do { if (MARKERP (x)) XSETFASTINT (x, marker_position (x)); \ |
| 1491 | else if (!INTEGERP (x) && !FLOATP (x)) \ | 1491 | else if (!INTEGERP (x) && !FLOATP (x)) \ |
| 1492 | x = wrong_type_argument (Qnumber_or_marker_p, (x)); } while (0) | 1492 | x = wrong_type_argument (Qnumber_or_marker_p, (x)); } while (0) |
| 1493 | 1493 | ||
| 1494 | #define CHECK_OVERLAY(x, i) \ | 1494 | #define CHECK_OVERLAY(x) \ |
| 1495 | do { if (!OVERLAYP ((x))) x = wrong_type_argument (Qoverlayp, (x));} while (0) | 1495 | do { if (!OVERLAYP ((x))) x = wrong_type_argument (Qoverlayp, (x));} while (0) |
| 1496 | 1496 | ||
| 1497 | /* Since we can't assign directly to the CAR or CDR fields of a cons | 1497 | /* Since we can't assign directly to the CAR or CDR fields of a cons |
| 1498 | cell, use these when checking that those fields contain numbers. */ | 1498 | cell, use these when checking that those fields contain numbers. */ |
| 1499 | #define CHECK_NUMBER_CAR(x, i) \ | 1499 | #define CHECK_NUMBER_CAR(x) \ |
| 1500 | do { \ | 1500 | do { \ |
| 1501 | Lisp_Object tmp = XCAR (x); \ | 1501 | Lisp_Object tmp = XCAR (x); \ |
| 1502 | CHECK_NUMBER (tmp, (i)); \ | 1502 | CHECK_NUMBER (tmp); \ |
| 1503 | XSETCAR ((x), tmp); \ | 1503 | XSETCAR ((x), tmp); \ |
| 1504 | } while (0) | 1504 | } while (0) |
| 1505 | 1505 | ||
| 1506 | #define CHECK_NUMBER_CDR(x, i) \ | 1506 | #define CHECK_NUMBER_CDR(x) \ |
| 1507 | do { \ | 1507 | do { \ |
| 1508 | Lisp_Object tmp = XCDR (x); \ | 1508 | Lisp_Object tmp = XCDR (x); \ |
| 1509 | CHECK_NUMBER (tmp, (i)); \ | 1509 | CHECK_NUMBER (tmp); \ |
| 1510 | XSETCDR ((x), tmp); \ | 1510 | XSETCDR ((x), tmp); \ |
| 1511 | } while (0) | 1511 | } while (0) |
| 1512 | 1512 | ||