diff options
| author | Barry O'Reilly | 2013-09-11 01:03:23 -0400 |
|---|---|---|
| committer | Barry O'Reilly | 2013-09-11 01:03:23 -0400 |
| commit | ebb99847285bca912e04f79dd3d9dcc84769ccf6 (patch) | |
| tree | a3be4b8a0d987e4c6a54d284737a1383de933000 /src/lisp.h | |
| parent | 1b3b87dfe0fae8e5266319531c0a874c8b4313b1 (diff) | |
| download | emacs-ebb99847285bca912e04f79dd3d9dcc84769ccf6.tar.gz emacs-ebb99847285bca912e04f79dd3d9dcc84769ccf6.zip | |
Change comparison functions =, <, >, <=, >= to take many arguments.
* src/data.c: Change comparison functions' interface and
implementation
* src/lisp.h: Make arithcompare available for efficient two arg
comparisons
* src/bytecode.c: Use arithcompare
* src/fileio.c: Use new interface
* test/automated/data-tests.el: New tests for comparison functions
* etc/NEWS
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 38b538d9bc2..2b1af1faa19 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3160,6 +3160,16 @@ EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST; | |||
| 3160 | /* Defined in data.c. */ | 3160 | /* Defined in data.c. */ |
| 3161 | extern Lisp_Object indirect_function (Lisp_Object); | 3161 | extern Lisp_Object indirect_function (Lisp_Object); |
| 3162 | extern Lisp_Object find_symbol_value (Lisp_Object); | 3162 | extern Lisp_Object find_symbol_value (Lisp_Object); |
| 3163 | enum Arith_Comparison { | ||
| 3164 | ARITH_EQUAL, | ||
| 3165 | ARITH_NOTEQUAL, | ||
| 3166 | ARITH_LESS, | ||
| 3167 | ARITH_GRTR, | ||
| 3168 | ARITH_LESS_OR_EQUAL, | ||
| 3169 | ARITH_GRTR_OR_EQUAL | ||
| 3170 | }; | ||
| 3171 | extern Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2, | ||
| 3172 | enum Arith_Comparison comparison); | ||
| 3163 | 3173 | ||
| 3164 | /* Convert the integer I to an Emacs representation, either the integer | 3174 | /* Convert the integer I to an Emacs representation, either the integer |
| 3165 | itself, or a cons of two or three integers, or if all else fails a float. | 3175 | itself, or a cons of two or three integers, or if all else fails a float. |