Commit 8be5e8a4 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent 6fa38e5e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment