diff options
| author | Richard M. Stallman | 1997-07-04 20:44:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-04 20:44:52 +0000 |
| commit | 2e34157cd9e74150e79e0ce23236252b47fb5f1a (patch) | |
| tree | 418451da8380ec73d5d46dc648c07e6ad8af845f /src/intervals.c | |
| parent | 8c239ac3ed4f636810bc08959e1318b1a6e928ba (diff) | |
| download | emacs-2e34157cd9e74150e79e0ce23236252b47fb5f1a.tar.gz emacs-2e34157cd9e74150e79e0ce23236252b47fb5f1a.zip | |
Fix bugs with inappropriate mixing of Lisp_Object with int.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intervals.c b/src/intervals.c index fa23272160b..995b1cfb2eb 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -85,7 +85,7 @@ create_root_interval (parent) | |||
| 85 | XSTRING (parent)->intervals = new; | 85 | XSTRING (parent)->intervals = new; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | new->parent = (INTERVAL) parent; | 88 | new->parent = (INTERVAL) XFASTINT (parent); |
| 89 | new->position = 1; | 89 | new->position = 1; |
| 90 | 90 | ||
| 91 | return new; | 91 | return new; |
| @@ -411,7 +411,7 @@ balance_possible_root_interval (interval) | |||
| 411 | if (interval->parent == NULL_INTERVAL) | 411 | if (interval->parent == NULL_INTERVAL) |
| 412 | return interval; | 412 | return interval; |
| 413 | 413 | ||
| 414 | parent = (Lisp_Object) (interval->parent); | 414 | XSETFASTINT (parent, (EMACS_INT) interval->parent); |
| 415 | interval = balance_an_interval (interval); | 415 | interval = balance_an_interval (interval); |
| 416 | 416 | ||
| 417 | if (BUFFERP (parent)) | 417 | if (BUFFERP (parent)) |
| @@ -1130,10 +1130,10 @@ delete_interval (i) | |||
| 1130 | if (ROOT_INTERVAL_P (i)) | 1130 | if (ROOT_INTERVAL_P (i)) |
| 1131 | { | 1131 | { |
| 1132 | Lisp_Object owner; | 1132 | Lisp_Object owner; |
| 1133 | owner = (Lisp_Object) i->parent; | 1133 | XSETFASTINT (owner, (EMACS_INT) i->parent); |
| 1134 | parent = delete_node (i); | 1134 | parent = delete_node (i); |
| 1135 | if (! NULL_INTERVAL_P (parent)) | 1135 | if (! NULL_INTERVAL_P (parent)) |
| 1136 | parent->parent = (INTERVAL) owner; | 1136 | parent->parent = (INTERVAL) XFASTINT (owner); |
| 1137 | 1137 | ||
| 1138 | if (BUFFERP (owner)) | 1138 | if (BUFFERP (owner)) |
| 1139 | BUF_INTERVALS (XBUFFER (owner)) = parent; | 1139 | BUF_INTERVALS (XBUFFER (owner)) = parent; |
| @@ -1868,7 +1868,7 @@ move_if_not_intangible (position) | |||
| 1868 | if (! NILP (Vinhibit_point_motion_hooks)) | 1868 | if (! NILP (Vinhibit_point_motion_hooks)) |
| 1869 | /* If intangible is inhibited, always move point to POSITION. */ | 1869 | /* If intangible is inhibited, always move point to POSITION. */ |
| 1870 | ; | 1870 | ; |
| 1871 | else if (PT < position && pos < ZV) | 1871 | else if (PT < position && XINT (pos) < ZV) |
| 1872 | { | 1872 | { |
| 1873 | /* We want to move forward, so check the text before POSITION. */ | 1873 | /* We want to move forward, so check the text before POSITION. */ |
| 1874 | 1874 | ||
| @@ -1884,7 +1884,7 @@ move_if_not_intangible (position) | |||
| 1884 | intangible_propval)) | 1884 | intangible_propval)) |
| 1885 | pos = Fprevious_char_property_change (pos, Qnil); | 1885 | pos = Fprevious_char_property_change (pos, Qnil); |
| 1886 | } | 1886 | } |
| 1887 | else if (pos > BEGV) | 1887 | else if (XINT (pos) > BEGV) |
| 1888 | { | 1888 | { |
| 1889 | /* We want to move backward, so check the text after POSITION. */ | 1889 | /* We want to move backward, so check the text after POSITION. */ |
| 1890 | 1890 | ||
| @@ -2010,7 +2010,7 @@ copy_intervals_to_string (string, buffer, position, length) | |||
| 2010 | if (NULL_INTERVAL_P (interval_copy)) | 2010 | if (NULL_INTERVAL_P (interval_copy)) |
| 2011 | return; | 2011 | return; |
| 2012 | 2012 | ||
| 2013 | interval_copy->parent = (INTERVAL) string; | 2013 | interval_copy->parent = (INTERVAL) XFASTINT (string); |
| 2014 | XSTRING (string)->intervals = interval_copy; | 2014 | XSTRING (string)->intervals = interval_copy; |
| 2015 | } | 2015 | } |
| 2016 | 2016 | ||