__private_extern__ _CFPFactory *_CFPFactoryCreateByName(CFAllocatorRef allocator, CFUUIDRef factoryID, CFPlugInRef plugIn, CFStringRef funcName) { _CFPFactory *factory = _CFPFactoryCommonCreate(allocator, factoryID); factory->_func = NULL; factory->_plugIn = plugIn; if (plugIn) _CFPlugInAddFactory(plugIn, factory); factory->_funcName = (funcName ? (CFStringRef)CFStringCreateCopy(allocator, funcName) : NULL); return factory; }
CF_PRIVATE _CFPFactoryRef _CFPFactoryCreateByName(CFAllocatorRef allocator, CFUUIDRef factoryID, CFPlugInRef plugIn, CFStringRef funcName) { _CFPFactoryRef factory = _CFPFactoryCommonCreate(allocator, factoryID); __CFSpinLock(&factory->_lock); factory->_func = NULL; factory->_plugIn = (CFPlugInRef)CFRetain(plugIn); if (plugIn) _CFPlugInAddFactory(plugIn, factory); factory->_funcName = (funcName ? (CFStringRef)CFStringCreateCopy(allocator, funcName) : NULL); __CFSpinUnlock(&factory->_lock); return factory; }