mirror of
https://github.com/golang/go
synced 2024-11-26 02:57:57 -07:00
remove incorrect (!) consts
-r SVN=126198
This commit is contained in:
parent
5b904a3bde
commit
999b12c768
@ -123,7 +123,7 @@ int utfnlen(const char* s, long n);
|
|||||||
// byte terminating a string is considered to be part of the string s.
|
// byte terminating a string is considered to be part of the string s.
|
||||||
// (cf. strchr)
|
// (cf. strchr)
|
||||||
|
|
||||||
const char* utfrune(const char* s, Rune r);
|
/*const*/ char* utfrune(const char* s, Rune r);
|
||||||
|
|
||||||
|
|
||||||
// utfrrune returns a pointer to the last occurrence of rune r in the
|
// utfrrune returns a pointer to the last occurrence of rune r in the
|
||||||
@ -131,7 +131,7 @@ const char* utfrune(const char* s, Rune r);
|
|||||||
// byte terminating a string is considered to be part of the string s.
|
// byte terminating a string is considered to be part of the string s.
|
||||||
// (cf. strrchr)
|
// (cf. strrchr)
|
||||||
|
|
||||||
const char* utfrrune(const char* s, Rune r);
|
/*const*/ char* utfrrune(const char* s, Rune r);
|
||||||
|
|
||||||
|
|
||||||
// utfutf returns a pointer to the first occurrence of the UTF string
|
// utfutf returns a pointer to the first occurrence of the UTF string
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "utf.h"
|
#include "utf.h"
|
||||||
#include "utfdef.h"
|
#include "utfdef.h"
|
||||||
|
|
||||||
const
|
/* const - removed for go code */
|
||||||
char*
|
char*
|
||||||
utfrrune(const char *s, Rune c)
|
utfrrune(const char *s, Rune c)
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ utfrrune(const char *s, Rune c)
|
|||||||
c1 = *(uchar*)s;
|
c1 = *(uchar*)s;
|
||||||
if(c1 < Runeself) { /* one byte rune */
|
if(c1 < Runeself) { /* one byte rune */
|
||||||
if(c1 == 0)
|
if(c1 == 0)
|
||||||
return s1;
|
return (char*)s1;
|
||||||
if(c1 == c)
|
if(c1 == c)
|
||||||
s1 = s;
|
s1 = s;
|
||||||
s++;
|
s++;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "utf.h"
|
#include "utf.h"
|
||||||
#include "utfdef.h"
|
#include "utfdef.h"
|
||||||
|
|
||||||
const
|
/* const - removed for go code */
|
||||||
char*
|
char*
|
||||||
utfrune(const char *s, Rune c)
|
utfrune(const char *s, Rune c)
|
||||||
{
|
{
|
||||||
@ -33,13 +33,13 @@ utfrune(const char *s, Rune c)
|
|||||||
if(c1 == 0)
|
if(c1 == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if(c1 == c)
|
if(c1 == c)
|
||||||
return s;
|
return (char*)s;
|
||||||
s++;
|
s++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
n = chartorune(&r, s);
|
n = chartorune(&r, s);
|
||||||
if(r == c)
|
if(r == c)
|
||||||
return s;
|
return (char*)s;
|
||||||
s += n;
|
s += n;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user