mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind,internal/importers: always generate toString methods
When wrapping Java exceptions, their toString() methods are called from the wrapper's Error() method to satisfy the Go error interface. Make sure toString() is always included, even if it never directly referenced from bound packages. Change-Id: I5653f6ad82afbe4b061e02a69d60453000288a83 Reviewed-on: https://go-review.googlesource.com/35189 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Vendored
+10
@@ -46,6 +46,10 @@ typedef struct ret_nbyteslice {
|
||||
jint exc;
|
||||
} ret_nbyteslice;
|
||||
|
||||
extern ret_nstring cproxy_java_lang_Float_toString(jint this);
|
||||
extern ret_nstring cproxy_java_lang_Object_toString(jint this);
|
||||
extern ret_nstring cproxy_java_lang_Character_toString(jint this);
|
||||
extern ret_nstring cproxy_java_lang_Character_Subset_toString(jint this);
|
||||
// JNI function headers for the Go <=> Java bridge.
|
||||
// gobind -lang=java java
|
||||
//
|
||||
@@ -59,13 +63,19 @@ typedef struct ret_nbyteslice {
|
||||
extern jclass proxy_class_java_F;
|
||||
extern jmethodID proxy_class_java_F_cons;
|
||||
|
||||
nstring cproxyjava_F_ToString(int32_t refnum);
|
||||
|
||||
extern jclass proxy_class_java_O;
|
||||
extern jmethodID proxy_class_java_O_cons;
|
||||
|
||||
nstring cproxyjava_O_ToString(int32_t refnum);
|
||||
|
||||
extern jclass proxy_class_java_R;
|
||||
extern jmethodID proxy_class_java_R_cons;
|
||||
|
||||
extern jclass proxy_class_java_S;
|
||||
extern jmethodID proxy_class_java_S_cons;
|
||||
|
||||
nstring cproxyjava_S_ToString(int32_t refnum);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user