fixcb.go 426 B

12345678910111213141516171819202122
  1. // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
  2. package saxocgo
  3. /*
  4. #include <libcfix.h>
  5. #include <string.h>
  6. */
  7. import "C"
  8. import (
  9. "unsafe"
  10. )
  11. //export GoOnSaxoMdMessage
  12. func GoOnSaxoMdMessage(tick *C.TickFull, ctx unsafe.Pointer) {
  13. app := (*App)(ctx)
  14. t := &FixTick{}
  15. size := unsafe.Sizeof(*t)
  16. C.memcpy(unsafe.Pointer(t), unsafe.Pointer(tick), C.size_t(size))
  17. app.onMdMessage(t)
  18. }