mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-20 20:39:06 +00:00
chore: fix function names in comment
Signed-off-by: hongkuang <liurenhong@outlook.com>
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ func (i simpleImporter) Import(path string) (*types.Package, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// formatDiagnostics formats the error message to be an indented comment. It
|
// formatDiagnostic formats the error message to be an indented comment. It
|
||||||
// also fixes Windows path name issues (backward slashes).
|
// also fixes Windows path name issues (backward slashes).
|
||||||
func formatDiagnostic(err error) string {
|
func formatDiagnostic(err error) string {
|
||||||
msg := err.Error()
|
msg := err.Error()
|
||||||
|
|||||||
@@ -1657,7 +1657,7 @@ var pinTimerMapping = [...]uint8{
|
|||||||
PB30 / 2: pinTCC0Ch0 | pinTCC1Ch2<<4,
|
PB30 / 2: pinTCC0Ch0 | pinTCC1Ch2<<4,
|
||||||
}
|
}
|
||||||
|
|
||||||
// findPinPadMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
|
// findPinTimerMapping returns the pin mode (PinTCC or PinTCCAlt) and the channel
|
||||||
// number for a given timer and pin. A zero PinMode is returned if no mapping
|
// number for a given timer and pin. A zero PinMode is returned if no mapping
|
||||||
// could be found.
|
// could be found.
|
||||||
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
|
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
|
||||||
|
|||||||
@@ -1928,7 +1928,7 @@ var pinTimerMapping = [...]struct{ F, G uint8 }{
|
|||||||
PB02 / 2: {pinTCC2_2, 0},
|
PB02 / 2: {pinTCC2_2, 0},
|
||||||
}
|
}
|
||||||
|
|
||||||
// findPinPadMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
|
// findPinTimerMapping returns the pin mode (PinTCCF or PinTCCG) and the channel
|
||||||
// number for a given timer and pin. A zero PinMode is returned if no mapping
|
// number for a given timer and pin. A zero PinMode is returned if no mapping
|
||||||
// could be found.
|
// could be found.
|
||||||
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
|
func findPinTimerMapping(timer uint8, pin Pin) (PinMode, uint8) {
|
||||||
|
|||||||
+1
-1
@@ -142,7 +142,7 @@ func joinPath(dir, name string) string {
|
|||||||
return dir + string(PathSeparator) + name
|
return dir + string(PathSeparator) + name
|
||||||
}
|
}
|
||||||
|
|
||||||
// LastIndexByte from the strings package.
|
// lastIndex from the strings package.
|
||||||
func lastIndex(s string, sep byte) int {
|
func lastIndex(s string, sep byte) int {
|
||||||
for i := len(s) - 1; i >= 0; i-- {
|
for i := len(s) - 1; i >= 0; i-- {
|
||||||
if s[i] == sep {
|
if s[i] == sep {
|
||||||
|
|||||||
+1
-1
@@ -980,7 +980,7 @@ func (t *rawType) Comparable() bool {
|
|||||||
return (t.meta & flagComparable) == flagComparable
|
return (t.meta & flagComparable) == flagComparable
|
||||||
}
|
}
|
||||||
|
|
||||||
// isbinary() returns if the hashmapAlgorithmBinary functions can be used on this type
|
// isBinary returns if the hashmapAlgorithmBinary functions can be used on this type
|
||||||
func (t *rawType) isBinary() bool {
|
func (t *rawType) isBinary() bool {
|
||||||
return (t.meta & flagIsBinary) == flagIsBinary
|
return (t.meta & flagIsBinary) == flagIsBinary
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ func TestRWMutexWriteToRead(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRWMutexWriteToRead tests the transition from a read lock to a write lock while contended.
|
// TestRWMutexReadToWrite tests the transition from a read lock to a write lock while contended.
|
||||||
func TestRWMutexReadToWrite(t *testing.T) {
|
func TestRWMutexReadToWrite(t *testing.T) {
|
||||||
// Create a new RWMutex and read-lock it several times.
|
// Create a new RWMutex and read-lock it several times.
|
||||||
const n = 3
|
const n = 3
|
||||||
|
|||||||
Reference in New Issue
Block a user