]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: change int32 to intgo in findnull and findnullw
authorRob Pike <r@golang.org>
Tue, 6 Aug 2013 11:49:03 +0000 (21:49 +1000)
committerRob Pike <r@golang.org>
Tue, 6 Aug 2013 11:49:03 +0000 (21:49 +1000)
Update #6046.
This CL just does findnull and findnullw. There are other functions
to fix but doing them a few at a time will help isolate any (unlikely)
breakages these changes bring up in architectures I can't test
myself.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12520043

src/pkg/runtime/env_plan9.c
src/pkg/runtime/env_posix.c
src/pkg/runtime/os_plan9.c
src/pkg/runtime/os_plan9_386.c
src/pkg/runtime/os_plan9_amd64.c
src/pkg/runtime/print.c
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.h
src/pkg/runtime/string.goc

index 0483d7eef57ed76c22836e0d3cde92c68e1a2d4e..599319c755022c4cddd2f262564d93d851f6d429 100644 (file)
@@ -8,7 +8,8 @@
 byte*
 runtime·getenv(int8 *s)
 {
-       int32 fd, len, n, r;
+       int32 fd, n, r;
+       intgo len;
        byte file[128];
        byte *p;
 
index 8333811fb8ef0de486d4931ec9afac839d81781e..58da08508551127b5613e61ace29ed532972f2d2 100644 (file)
@@ -11,7 +11,8 @@ Slice syscall·envs;
 byte*
 runtime·getenv(int8 *s)
 {
-       int32 i, j, len;
+       int32 i, j;
+       intgo len;
        byte *v, *bs;
        String* envv;
        int32 envc;
index e8e116f4882656f819c52932b2c3bfdca6373d32..52460c7c81c6c158c5926f43a9172da56223e263 100644 (file)
@@ -194,7 +194,8 @@ runtime·goexitsall(int8 *status)
 int32
 runtime·postnote(int32 pid, int8* msg)
 {
-       int32 fd, len;
+       int32 fd;
+       intgo len;
        uint8 buf[128];
        uint8 tmp[16];
        uint8 *p, *q;
index a174771db34cfd15ef55ab6bf9a3244c625bc551..0844d726b59913142c4f302743879b41f39785b4 100644 (file)
@@ -32,7 +32,7 @@ runtime·sighandler(void *v, int8 *s, G *gp)
        Ureg *ureg;
        uintptr *sp;
        SigTab *sig, *nsig;
-       int32 len, i;
+       intgo len, i;
 
        if(!s)
                return NCONT;
index 30f31e99693bd285e0c9a59e82fa2e385741bc9a..58822ff84848d2bb954c2ff467d3085e21a96c6b 100644 (file)
@@ -40,7 +40,7 @@ runtime·sighandler(void *v, int8 *s, G *gp)
        Ureg *ureg;
        uintptr *sp;
        SigTab *sig, *nsig;
-       int32 len, i;
+       intgo i, len;
 
        if(!s)
                return NCONT;
index 5b601599bc9a68d6ef9f5f0a1d32fc3555c5547c..922076235503e9631086247cb3dd07fe932d1e06 100644 (file)
@@ -12,7 +12,7 @@ static void vprintf(int8*, byte*);
 // write to goroutine-local buffer if diverting output,
 // or else standard error.
 static void
-gwrite(void *v, int32 n)
+gwrite(void *v, intgo n)
 {
        if(g == nil || g->writebuf == nil) {
                runtime·write(2, v, n);
index a0e9a194c6dbc1e86605c4e3b19f0dfe5b1904cf..7f693589f63e84ad8d62a71d0de4fb04afc2ae15 100644 (file)
@@ -393,7 +393,7 @@ void
 runtime·parsedebugvars(void)
 {
        byte *p;
-       int32 i, n;
+       intgo i, n;
 
        p = runtime·getenv("GODEBUG");
        if(p == nil)
index e48b58a70e820cdc11bbec600bc5d8abfc797201..ff3ecfaaaff405a6078698adaf9379de36a91be8 100644 (file)
@@ -717,8 +717,8 @@ extern      DebugVars       runtime·debug;
  */
 int32  runtime·strcmp(byte*, byte*);
 byte*  runtime·strstr(byte*, byte*);
-int32  runtime·findnull(byte*);
-int32  runtime·findnullw(uint16*);
+intgo  runtime·findnull(byte*);
+intgo  runtime·findnullw(uint16*);
 void   runtime·dump(byte*, int32);
 int32  runtime·runetochar(byte*, int32);
 int32  runtime·charntorune(int32*, uint8*, int32);
index 15d690a921da72b0119c812e686729dd619c2a16..dccb97128a51f88eb180be740390dcfe0fa5b9dc 100644 (file)
@@ -10,10 +10,10 @@ package runtime
 
 String runtime·emptystring;
 
-int32
+intgo
 runtime·findnull(byte *s)
 {
-       int32 l;
+       intgo l;
 
        if(s == nil)
                return 0;
@@ -22,10 +22,10 @@ runtime·findnull(byte *s)
        return l;
 }
 
-int32
+intgo
 runtime·findnullw(uint16 *s)
 {
-       int32 l;
+       intgo l;
 
        if(s == nil)
                return 0;