To improve readability for default numeric types
represented as strings, use 0.0 for floating point types.
(No tests make use of this change so golden update
not necessary; not significant enough for new test/test mod.)
Fix spelling on error statement; this was the only
instance of that spelling error in the repository.
Change-Id: I373890725b33da11c6780ba93674d89541bf758c
Reviewed-on: https://go-review.googlesource.com/13645
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Introduce options -javapkg and -prefix for gobind command.
The following generates java class Testpkg with package name com.example.
gobind -lang=java -javapkg=com.example testpkg
The following generates objective-c files where function and type names
are prefixed with ExampleTestpkg.
gobind -lang=objc -prefix=Example testpkg
As discussed in golang/go#9660 and golang/go#12245.
Gomobile support is not yet implemented.
Change-Id: Ib9e39997ce915580a5a2e25643c0c28373f27ee1
Reviewed-on: https://go-review.googlesource.com/13969
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This breaks our dependency on the x/tools repository, which has a
tendency to change in unexpected ways. It also means we can use the
version of go/types that ships with Go 1.5.
Along the way, it appears that cgo processing has changed slightly.
The old check for cgo files apparently wasn't working, so I removed
it.
Change-Id: I14378e9df9cd65c5ab61b47728ba0d56f31cdf76
Reviewed-on: https://go-review.googlesource.com/12680
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Also fixes a parameter name handling problem when processing a
function signature that omits parameter names.
Fixesgolang/go#10788.
Change-Id: I65273d330bbf3a836ec9e4ffb691927970d795d8
Reviewed-on: https://go-review.googlesource.com/9926
Reviewed-by: Alan Donovan <adonovan@google.com>
This is to enable more flexible encoding/decoding of Go string.
For Java, we use UTF16 to be compatible with java string.
For other languages, we will want other way to represent a string.
Change-Id: Iccd53e2eea18d37636c3c619d06cb473facef0cd
Reviewed-on: https://go-review.googlesource.com/8628
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This change makes gobind to generate proper Go-side proxy code to
handle interface methods that have parameters and return values.
It allows gobind to accept struct pointer types as parameters
or a return value of a method.
Fixesgolang/go#9487, golang/go#9488.
Change-Id: Id243c42ee0701d40e3871e392140368c2f8f9bc6
Reviewed-on: https://go-review.googlesource.com/2348
Reviewed-by: David Crawshaw <crawshaw@golang.org>