From 7ee60b174dd92edca7e608dc06ec4f1b2d0eb79f Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 7 Oct 2008 10:03:34 -0700 Subject: sys.stringtorune doesn't need a length parameter. R=rsc DELTA=7 (0 added, 0 deleted, 7 changed) OCL=16600 CL=16630 --- src/runtime/rune.c | 4 ++-- src/runtime/runtime.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime') diff --git a/src/runtime/rune.c b/src/runtime/rune.c index d705a5e36f..5738ca3646 100644 --- a/src/runtime/rune.c +++ b/src/runtime/rune.c @@ -235,9 +235,9 @@ sys·bytestorune(byte *str, int32 off, int32 length, int32 outrune, int32 outcou } void -sys·stringtorune(string str, int32 off, int32 length, int32 outrune, int32 outcount) +sys·stringtorune(string str, int32 off, int32 outrune, int32 outcount) { - outcount = charntorune(&outrune, str->str + off, length); + outcount = charntorune(&outrune, str->str + off, str->len - off); FLUSH(&outrune); FLUSH(&outcount); } diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index f590472439..f182aebae7 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -293,4 +293,4 @@ void sys·intstring(int64, string); */ void sys·readfile(string, string, bool); void sys·bytestorune(byte*, int32, int32, int32, int32); -void sys·stringtorune(string, int32, int32, int32, int32); +void sys·stringtorune(string, int32, int32, int32); -- cgit v1.3