summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-06-01 19:58:08 +0200
committerBram Moolenaar <Bram@vim.org>2010-06-01 19:58:08 +0200
commit83d09bb85e471135222f79b15de549f435e73fae (patch)
tree83d2de1dab6c03a620190a2cecdac7edec4123be /src/structs.h
parent914703bee2422e2797576e06145380389096ec09 (diff)
downloadvim-git-83d09bb85e471135222f79b15de549f435e73fae.tar.gz
Don't use pointers to store numbers, use a union.
Fixed MSVC makefile use of /Wp64 flag.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/structs.h b/src/structs.h
index 927aa06db..daf254f31 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -287,10 +287,24 @@ struct u_entry
struct u_header
{
- u_header_T *uh_next; /* pointer to next undo header in list */
- u_header_T *uh_prev; /* pointer to previous header in list */
- u_header_T *uh_alt_next; /* pointer to next header for alt. redo */
- u_header_T *uh_alt_prev; /* pointer to previous header for alt. redo */
+ /* The following have a pointer and a number. The number is used when
+ * reading the undo file in u_read_undo() */
+ union {
+ u_header_T *ptr; /* pointer to next undo header in list */
+ long seq;
+ } uh_next;
+ union {
+ u_header_T *ptr; /* pointer to previous header in list */
+ long seq;
+ } uh_prev;
+ union {
+ u_header_T *ptr; /* pointer to next header for alt. redo */
+ long seq;
+ } uh_alt_next;
+ union {
+ u_header_T *ptr; /* pointer to previous header for alt. redo */
+ long seq;
+ } uh_alt_prev;
long uh_seq; /* sequence number, higher == newer undo */
int uh_walk; /* used by undo_time() */
u_entry_T *uh_entry; /* pointer to first entry */