FAQ
Hello,

I have a C function and I want to use it in my go code.

This is my attempt http://play.golang.org/p/zxocK4C-Du but apparently, it
didn't work. Is it that my type conversion is wrong?

is it possible I rewrite this in go? and generate about the same assembly?


Thanks!

--
Jackie

--

Search Discussions

  • Minux at Jan 24, 2013 at 11:14 pm

    On Fri, Jan 25, 2013 at 7:01 AM, Jackie Li wrote:

    I have a C function and I want to use it in my go code.

    This is my attempt http://play.golang.org/p/zxocK4C-Du but apparently, it
    didn't work. Is it that my type conversion is wrong?
    i think the type conversion is right.
    however, i suggest you first check your C code is correct by writing the
    test
    in C (or you add some printf to the C code and see if the result is
    correct).
    is it possible I rewrite this in go? and generate about the same assembly?
    possible to rewrite the conversion code in Go, but you must handle the
    bitfields yourself.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 24, '13 at 11:01p
activeJan 24, '13 at 11:14p
posts2
users2
websitegolang.org

2 users in discussion

Jackie Li: 1 post Minux: 1 post

People

Translate

site design / logo © 2021 Grokbase