Ejemplo n.º 1
0
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
}
Ejemplo n.º 2
0
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)
}