mirror of
https://github.com/golang/go
synced 2024-11-20 04:04:41 -07:00
cmd/cc: allow to call nested packages from within C code
E.g. sync/atomic.LoadInt32() can be called as sync»atomic·LoadInt32() R=rsc CC=golang-dev https://golang.org/cl/6448057
This commit is contained in:
parent
6fa38e5e0a
commit
8be5e8a419
@ -377,11 +377,16 @@ lookup(void)
|
||||
symb[1] = '"';
|
||||
}
|
||||
|
||||
// turn · into .
|
||||
for(r=w=symb; *r; r++) {
|
||||
// turn · (U+00B7) into .
|
||||
// turn ∕ (U+2215) into /
|
||||
if((uchar)*r == 0xc2 && (uchar)*(r+1) == 0xb7) {
|
||||
*w++ = '.';
|
||||
r++;
|
||||
}else if((uchar)*r == 0xe2 && (uchar)*(r+1) == 0x88 && (uchar)*(r+2) == 0x95) {
|
||||
*w++ = '/';
|
||||
r++;
|
||||
r++;
|
||||
}else
|
||||
*w++ = *r;
|
||||
}
|
||||
|
@ -251,11 +251,16 @@ lookup(void)
|
||||
symb[1] = '"';
|
||||
}
|
||||
|
||||
// turn · into .
|
||||
for(r=w=symb; *r; r++) {
|
||||
// turn · (U+00B7) into .
|
||||
// turn ∕ (U+2215) into /
|
||||
if((uchar)*r == 0xc2 && (uchar)*(r+1) == 0xb7) {
|
||||
*w++ = '.';
|
||||
r++;
|
||||
}else if((uchar)*r == 0xe2 && (uchar)*(r+1) == 0x88 && (uchar)*(r+2) == 0x95) {
|
||||
*w++ = '/';
|
||||
r++;
|
||||
r++;
|
||||
}else
|
||||
*w++ = *r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user