universe.objc.m.golden 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Objective-C API for talking to Go package.
  2. // gobind -lang=objc
  3. //
  4. // File is generated by gobind. Do not edit.
  5. #include <Foundation/Foundation.h>
  6. #include "seq.h"
  7. #include "_cgo_export.h"
  8. #include "Universe.objc.h"
  9. @implementation Universeerror {
  10. }
  11. - (nonnull instancetype)initWithRef:(id)ref {
  12. if (self) {
  13. __ref = ref;
  14. self = [super initWithDomain:@"go" code:1 userInfo:@{NSLocalizedDescriptionKey: [self error]}];
  15. }
  16. return self;
  17. }
  18. - (NSString* _Nonnull)error {
  19. int32_t refnum = go_seq_go_to_refnum(self._ref);
  20. nstring r0 = proxy_error_Error(refnum);
  21. NSString *_ret0_ = go_seq_to_objc_string(r0);
  22. return _ret0_;
  23. }
  24. @end
  25. nstring cproxy_error_Error(int32_t refnum) {
  26. @autoreleasepool {
  27. Universeerror* o = go_seq_objc_from_refnum(refnum);
  28. NSString* _Nonnull ret0_;
  29. ret0_ = [o localizedDescription];
  30. nstring _ret0_ = go_seq_from_objc_string(ret0_);
  31. return _ret0_;
  32. }
  33. }
  34. __attribute__((constructor)) static void init() {
  35. init_seq();
  36. }