this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1591 from Lazerbeak12345/add-missing-open-default-component

fix(CarbonCore): add OpenDefaultComponent stub

authored by

CuriousTommy and committed by
GitHub
b7a59db9 0e09aec9

+13
+2
src/frameworks/CoreServices/include/CarbonCore/Components.h
··· 138 138 139 139 OSErr OpenAComponent(Component comp, ComponentInstance* out); 140 140 ComponentInstance OpenComponent(Component comp); 141 + ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType); 142 + 141 143 OSErr CloseComponent(ComponentInstance inst); 142 144 143 145 Component RegisterComponent(ComponentDescription *cd, ComponentRoutineUPP componentEntryPoint, SInt16 global,
+11
src/frameworks/CoreServices/src/CarbonCore/Components.cpp
··· 22 22 #include <CarbonCore/MacMemory.h> 23 23 #include "ComponentManager.h" 24 24 25 + static int verbose = 0; 26 + __attribute__((constructor)) static void initme(void) { 27 + verbose = getenv("STUB_VERBOSE") != NULL; 28 + } 29 + 25 30 Component FindNextComponent(Component prev, ComponentDescription* desc) 26 31 { 27 32 std::vector<Component> components = ComponentManager::instance()->findMatching(desc); ··· 82 87 ComponentInstance rv; 83 88 if (ComponentManager::instance()->instantiate(comp, &rv) == noErr) 84 89 return rv; 90 + return nullptr; 91 + } 92 + 93 + ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType) 94 + { 95 + if (verbose) puts("STUB: OpenDefaultComponent called"); 85 96 return nullptr; 86 97 } 87 98