Hi,
where is documented that methods can be created on C types ?

This works with go1.12.4, linux:
https://play.golang.org/p/gXpHCFOgDDg

package main

import (
    "C"
    "fmt"
)

func (i *C.int) Inc() {
    *i++
}

func main() {
    var i C.int
    i.Inc()
    fmt.Println(i)
}


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to