Lines Matching refs:stub

36 #include "stub.h"
65 const struct mapi_stub *stub = (const struct mapi_stub *) elem;
68 stub_name = &public_string_pool[(unsigned long) stub->name];
74 * Return the public stub with the given name.
84 * Add a dynamic stub.
89 struct mapi_stub *stub;
97 stub = &dynamic_stubs[idx];
100 stub->addr = entry_generate(
102 if (!stub->addr)
105 stub->name = (const void *) strdup(name);
107 stub->slot = -1;
111 return stub;
115 * Return the dynamic stub with the given name. If no such stub exists and
116 * generate is true, a new stub is generated.
122 struct mapi_stub *stub = NULL;
133 stub = &dynamic_stubs[i];
138 /* generate a dynamic stub */
139 if (generate && !stub)
140 stub = stub_add_dynamic(name);
144 return stub;
162 const struct mapi_stub *stub =
164 if (stub)
165 return stub;
170 stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias)
174 if (stub->slot >= 0)
182 entry_patch(stub->addr, slot);
183 stub->slot = slot;
187 * Return the name of a stub.
190 stub_get_name(const struct mapi_stub *stub)
194 if (stub >= public_stubs &&
195 stub < public_stubs + ARRAY_SIZE(public_stubs))
196 name = &public_string_pool[(unsigned long) stub->name];
198 name = (const char *) stub->name;
204 * Return the slot of a stub.
207 stub_get_slot(const struct mapi_stub *stub)
209 return stub->slot;
213 * Return the address of a stub.
216 stub_get_addr(const struct mapi_stub *stub)
218 assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC);
219 return (stub->addr) ? stub->addr : entry_get_public(stub->slot);