예제 #1
0
파일: stub.c 프로젝트: CSRedRat/libglvnd
/**
 * Return the address of a stub.
 */
mapi_func
stub_get_addr(const struct mapi_stub *stub)
{
   assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC);
   if (stub->addr != NULL)
   {
      return stub->addr;
   }
   else
   {
      int index = stub - public_stubs;
      return entry_get_public(index);
   }
}
예제 #2
0
/**
 * Return the address of a stub.
 */
mapi_func
stub_get_addr(const struct mapi_stub *stub)
{
   assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC);
   return (stub->addr) ? stub->addr : entry_get_public(stub->slot);
}