Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(70)

Delta Between Two Patch Sets: src/pkg/runtime/print.c

Issue 12519044: code review 12519044: runtime: change int32 to intgo in maxstring and concatstring (Closed)
Left Patch Set: diff -r 50c9f3544eed https://code.google.com/p/go/ Created 11 years, 7 months ago
Right Patch Set: diff -r da11b2a1cbc1 https://code.google.com/p/go/ Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/pkg/runtime/runtime.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include "runtime.h" 5 #include "runtime.h"
6 #include "type.h" 6 #include "type.h"
7 7
8 //static Lock debuglock; 8 //static Lock debuglock;
9 9
10 static void vprintf(int8*, byte*); 10 static void vprintf(int8*, byte*);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 void 344 void
345 runtime·printpointer(void *p) 345 runtime·printpointer(void *p)
346 { 346 {
347 runtime·printhex((uint64)p); 347 runtime·printhex((uint64)p);
348 } 348 }
349 349
350 void 350 void
351 runtime·printstring(String v) 351 runtime·printstring(String v)
352 { 352 {
353 extern uint64 runtime·maxstring;
iant 2013/08/06 13:07:16 Since maxstring is declared in runtime.h now, I th
354
355 if(v.len > runtime·maxstring) { 353 if(v.len > runtime·maxstring) {
356 gwrite("[string too long]", 17); 354 gwrite("[string too long]", 17);
357 return; 355 return;
358 } 356 }
359 if(v.len > 0) 357 if(v.len > 0)
360 gwrite(v.str, v.len); 358 gwrite(v.str, v.len);
361 } 359 }
362 360
363 void 361 void
364 runtime·printsp(void) 362 runtime·printsp(void)
365 { 363 {
366 gwrite(" ", 1); 364 gwrite(" ", 1);
367 } 365 }
368 366
369 void 367 void
370 runtime·printnl(void) 368 runtime·printnl(void)
371 { 369 {
372 gwrite("\n", 1); 370 gwrite("\n", 1);
373 } 371 }
374 372
375 void 373 void
376 runtime·typestring(Eface e, String s) 374 runtime·typestring(Eface e, String s)
377 { 375 {
378 s = *e.type->string; 376 s = *e.type->string;
379 FLUSH(&s); 377 FLUSH(&s);
380 } 378 }
381 379
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b