MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / BindNativeToPlugin

Method BindNativeToPlugin

core/logic/ShareSys.cpp:308–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void ShareSystem::BindNativeToPlugin(CPlugin *pPlugin, const RefPtr<Native> &entry)
309{
310 if (!entry->owner)
311 return;
312
313 sp::BaseRuntime *pContext = pPlugin->GetBaseContext()->GetBaseRuntime();
314
315 uint32_t i;
316 if (pContext->FindNativeByName(entry->name(), &i) != SP_ERROR_NONE)
317 return;
318
319 const sp_native_t *native = pContext->GetNative(i);
320 if (!native)
321 return;
322
323 if (native->status == SP_NATIVE_BOUND)
324 return;
325
326 BindNativeToPlugin(pPlugin, native, i, entry);
327}
328
329void ShareSystem::BindNativeToPlugin(CPlugin *pPlugin, const sp_native_t *native, uint32_t index,
330 const RefPtr<Native> &pEntry)

Callers 1

BindFakeNativesToMethod · 0.80

Calls 9

WeakNativeClass · 0.85
GetBaseContextMethod · 0.80
nameMethod · 0.80
AddWeakRefMethod · 0.80
ToNativeOwnerMethod · 0.80
GetMarkSerialMethod · 0.80
AddDependentMethod · 0.80
SetMarkSerialMethod · 0.80
runtimeMethod · 0.80

Tested by

no test coverage detected