Nitish – As noted, you cannot pass to C a pointer to Go structure. However, Go can use pointers C structures that are provided to it. YottaDB passes key-value tuples between C and Go, and you can look at working code that does this at https://gitlab.com/YottaDB/Lang/YDBGo with further documentation at https://docs.yottadb.com/MultiLangProgGuide/goprogram.html
After looking at the code and documentation, if you have specific questions, I can get them answered. Regards – Bhaskar On Monday, April 29, 2019 at 3:43:35 PM UTC-4, Tamás Gulácsi wrote: > > 2019. április 29., hétfő 17:41:51 UTC+2 időpontban Nitish Saboo a > következőt írta: >> >> Hi Tamás, >> >> If I return LogMessage type of object from C code, what type of object >> should be there on Go side to receive the return value because the Go side >> doesn't have a LogMessage object ? >> >> Thanks >> >> > That depends on what that LogMessage is. > If it is a struct, then you can get its fields. > And you can use that pointer in some C functions - this depends on the > given API. > > If LogMessage is a struct, you may be able to convert it to its Go > equivalent - if it is not too complicated (no union, no packing...). > -- 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.