summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/print.c
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-12-03 09:43:15 +0100
committerMichael Stapelberg <stapelberg@debian.org>2013-12-03 09:43:15 +0100
commit64d2a7c8945ba05af859901f5e248f1befdd8621 (patch)
tree013fcb7e9e3296ecdda876012252c36bd6bcb063 /src/pkg/runtime/print.c
parentb901efe83e212f0c34c769c079e41373da12d723 (diff)
downloadgolang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'src/pkg/runtime/print.c')
-rw-r--r--src/pkg/runtime/print.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pkg/runtime/print.c b/src/pkg/runtime/print.c
index 5b601599b..8de3ae4fa 100644
--- a/src/pkg/runtime/print.c
+++ b/src/pkg/runtime/print.c
@@ -4,6 +4,7 @@
#include "runtime.h"
#include "type.h"
+#include "../../cmd/ld/textflag.h"
//static Lock debuglock;
@@ -12,7 +13,7 @@ static void vprintf(int8*, byte*);
// write to goroutine-local buffer if diverting output,
// or else standard error.
static void
-gwrite(void *v, int32 n)
+gwrite(void *v, intgo n)
{
if(g == nil || g->writebuf == nil) {
runtime·write(2, v, n);
@@ -52,7 +53,7 @@ runtime·prints(int8 *s)
gwrite(s, runtime·findnull((byte*)s));
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·printf(int8 *s, ...)
{
@@ -179,7 +180,7 @@ vprintf(int8 *s, byte *base)
//runtime·unlock(&debuglock);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·goprintf(String s, ...)
{
@@ -350,8 +351,6 @@ runtime·printpointer(void *p)
void
runtime·printstring(String v)
{
- extern uint32 runtime·maxstring;
-
if(v.len > runtime·maxstring) {
gwrite("[string too long]", 17);
return;