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

Side by Side Diff: src/cmd/cgo/out.go

Issue 1399041: code review 1399041: Correct _cgo_free when C ABI does not pass first arg on... (Closed)
Patch Set: code review 1399041: Correct _cgo_free when C ABI does not pass first arg on... Created 14 years, 9 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/libcgo/util.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 package main 5 package main
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "go/ast" 9 "go/ast"
10 "go/printer" 10 "go/printer"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 ` 561 `
562 562
563 const cProlog = ` 563 const cProlog = `
564 #include "runtime.h" 564 #include "runtime.h"
565 #include "cgocall.h" 565 #include "cgocall.h"
566 566
567 #pragma dynimport initcgo initcgo "%s/libcgo.so" 567 #pragma dynimport initcgo initcgo "%s/libcgo.so"
568 #pragma dynimport libcgo_thread_start libcgo_thread_start "%s/libcgo.so" 568 #pragma dynimport libcgo_thread_start libcgo_thread_start "%s/libcgo.so"
569 #pragma dynimport libcgo_set_scheduler libcgo_set_scheduler "%s/libcgo.so" 569 #pragma dynimport libcgo_set_scheduler libcgo_set_scheduler "%s/libcgo.so"
570 #pragma dynimport _cgo_malloc _cgo_malloc "%s/libcgo.so" 570 #pragma dynimport _cgo_malloc _cgo_malloc "%s/libcgo.so"
571 #pragma dynimport _cgo_free free "%s/libcgo.so" 571 #pragma dynimport _cgo_free _cgo_free "%s/libcgo.so"
572 572
573 void 573 void
574 ·_C_GoString(int8 *p, String s) 574 ·_C_GoString(int8 *p, String s)
575 { 575 {
576 s = gostring((byte*)p); 576 s = gostring((byte*)p);
577 FLUSH(&s); 577 FLUSH(&s);
578 } 578 }
579 579
580 void 580 void
581 ·_C_CString(String s, int8 *p) 581 ·_C_CString(String s, int8 *p)
(...skipping 11 matching lines...) Expand all
593 typedef unsigned char uchar; 593 typedef unsigned char uchar;
594 typedef unsigned short ushort; 594 typedef unsigned short ushort;
595 typedef long long int64; 595 typedef long long int64;
596 typedef unsigned long long uint64; 596 typedef unsigned long long uint64;
597 597
598 typedef struct { char *p; int n; } GoString; 598 typedef struct { char *p; int n; } GoString;
599 typedef void *GoMap; 599 typedef void *GoMap;
600 typedef void *GoChan; 600 typedef void *GoChan;
601 typedef struct { void *t; void *v; } GoInterface; 601 typedef struct { void *t; void *v; } GoInterface;
602 ` 602 `
OLDNEW
« no previous file with comments | « no previous file | src/libcgo/util.c » ('j') | no next file with comments »

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