func FactoryAdd(ident string, cb FactoryF) { v := C.CString(ident) r := C.gomsgque_FactoryAdd(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) iErrorFactoryToGoWithCheck(r) lockFactory[&cb] = true }
func FactoryAdd(ident string, cb FactoryF) *MqFactoryS { v := C.CString(ident) r := C.gomsgque_FactoryAdd(v, C.MQ_PTR(&cb)) C.free(unsafe.Pointer(v)) incrFactoryRef(&cb) if r == nil { panic("MqFactoryS exception") } return (*MqFactoryS)(r) }