Skip to content

Commit

Permalink
gen: Omit trailing underscores from generayed method names
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Jul 5, 2023
1 parent 2c13109 commit 8c1a785
Show file tree
Hide file tree
Showing 10 changed files with 2,944 additions and 2,944 deletions.
4,392 changes: 2,196 additions & 2,196 deletions cocoa/cocoa_objc.gen.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/CALayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func (l CALayer) CornerRadius() float64 {
}

func (l CALayer) SetCornerRadius(r float64) {
l.SetCornerRadius_(CGFloat(r))
l.gen_CALayer.SetCornerRadius(CGFloat(r))
}

func (l CALayer) SetContents(o objc.Object) {
l.SetContents_(objc.Object_fromRef(o))
l.gen_CALayer.SetContents(objc.Object_fromRef(o))
}
2 changes: 1 addition & 1 deletion core/NSAttributedString.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type NSAttributedString struct {
// https://developer.apple.com/documentation/foundation/nsattributedstring/1407481-initwithstring?language=objc
func NSAttributedString_FromString(str string) NSAttributedString {
nsstr := NSString_FromString(str)
return NSAttributedString_alloc().InitWithString__asNSAttributedString(nsstr)
return NSAttributedString_alloc().InitWithString_asNSAttributedString(nsstr)
}

func NSAttributedString_FromObject(obj objc.Object) NSAttributedString {
Expand Down
2 changes: 1 addition & 1 deletion core/NSData.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type NSData struct {
func NSData_WithBytes(b []byte, length uint64) NSData {
buf := C.CBytes(b)
defer C.free(buf)
return NSData_dataWithBytes_length_(buf, NSUInteger(length))
return NSData_dataWithBytes_length(buf, NSUInteger(length))
}

// Length is the number of bytes contained by the data object.
Expand Down
4 changes: 2 additions & 2 deletions core/NSNumber.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ type NSNumber struct {
}

func NSNumber_WithBool(b bool) NSNumber {
return NSNumber_numberWithBool_(b)
return NSNumber_numberWithBool(b)
}

func NSNumber_WithInt(n int32) NSNumber {
return NSNumber_numberWithInt_(n)
return NSNumber_numberWithInt(n)
}
4 changes: 2 additions & 2 deletions core/NSString.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NSString_FromString(s string) NSString {
b := []byte(s)
c := C.CBytes(b)
defer C.free(unsafe.Pointer(c))
ret := NSString_alloc().InitWithBytes_length_encoding__asNSString(c, NSUInteger(len(b)), NSUTF8StringEncoding)
ret := NSString_alloc().InitWithBytes_length_encoding_asNSString(c, NSUInteger(len(b)), NSUTF8StringEncoding)
return ret
}

Expand All @@ -39,5 +39,5 @@ func NSString_FromObject(obj objc.Object) NSString {
}

func (s NSString) SizeWithAttributes(attrs NSDictionary) NSSize {
return s.gen_NSString.SizeWithAttributes_(attrs)
return s.gen_NSString.SizeWithAttributes(attrs)
}
2 changes: 1 addition & 1 deletion core/NSURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package core
type NSURL struct{ gen_NSURL }

func NSURL_Init(url string) NSURL {
return NSURL_URLWithString_(String(url))
return NSURL_URLWithString(String(url))
}
2 changes: 1 addition & 1 deletion core/NSURLRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ type NSURLRequest struct {
}

func NSURLRequest_Init(url NSURL) NSURLRequest {
return NSURLRequest_requestWithURL_(url)
return NSURLRequest_requestWithURL(url)
}
Loading

0 comments on commit 8c1a785

Please sign in to comment.