Browse Source

replace intptr_t with isize

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
a4e062b6e2
6 changed files with 4 additions and 6 deletions
  1. 0 1
      amd64/include/u.h
  2. 0 1
      riscv/include/u.h
  3. 1 1
      sys/src/9/port/portdat.h
  4. 1 1
      sys/src/9/riscv/stdint.h
  5. 1 1
      sys/src/cmd/lex/sub2.c
  6. 1 1
      sys/src/cmd/tbl/t5.c

+ 0 - 1
amd64/include/u.h

@@ -21,7 +21,6 @@ typedef u64 		usize;
 typedef	i64		isize;
 
 typedef unsigned int	uint;
-typedef i64		intptr_t;
 typedef	u32	Rune;
 typedef union FPdbleword FPdbleword;
 typedef u64	jmp_buf[10]; // for registers.

+ 0 - 1
riscv/include/u.h

@@ -21,7 +21,6 @@ typedef	u64		usize;
 typedef	i64		isize;
 
 typedef unsigned int	uint;
-typedef i64 intptr_t;
 typedef	u32		Rune;
 typedef union FPdbleword FPdbleword;
 // This is a guess! Assumes float!

+ 1 - 1
sys/src/9/port/portdat.h

@@ -714,7 +714,7 @@ struct Sched {
 
 typedef union Ar0 Ar0;
 union Ar0 {
-	intptr_t i;
+	isize i;
 	i32 l;
 	usize p;
 	usize u;

+ 1 - 1
sys/src/9/riscv/stdint.h

@@ -70,7 +70,7 @@ typedef u8 bool;
 #define false 0
 
 /* Types for `void *' pointers.  */
-typedef s64 intptr_t;
+typedef s64 isize;
 typedef u64 usize;
 
 #endif /* RISCV_STDINT_H */

+ 1 - 1
sys/src/cmd/lex/sub2.c

@@ -181,7 +181,7 @@ first(int v)	/* calculate set of positions with v as root which can be active in
 			break;
 		case RSCON:
 			i = stnum/2 +1;
-			p = (u8 *)(intptr_t)right[v];
+			p = (u8 *)(isize)right[v];
 			while(*p)
 				if(*p++ == i){
 					first(left[v]);

+ 1 - 1
sys/src/cmd/tbl/t5.c

@@ -70,7 +70,7 @@ gettbl(void)
 			ch = 1;
 			if (match(cstore, "T{")) { /* text follows */
 				table[nlin][icol].col =
-				    (char *)(intptr_t)gettext(cstore, nlin, icol,
+				    (char *)(isize)gettext(cstore, nlin, icol,
 				    font[icol][stynum[nlin]],
 				    csize[icol][stynum[nlin]]);
 			} else