Skip to content

loader_impl: pass context parameter through iface->load_from_file/memory/package call sites #655

@ROKUMATE

Description

@ROKUMATE

Context

Sub-issue 3 : Part of #634. Follows sub-issue 1 and 2. The three call sites in source/loader/source/loader_impl.c that invoke the interface function pointers must be updated to pass the context parameter.

For now the existing non-_ex internal functions pass NULL. The _ex variants added in sub-issue 4 will pass the real context value.

Changes

File: source/loader/source/loader_impl.c

L1289load_from_file call site:

// Before
handle = iface->load_from_file(impl, paths, size);

// After
handle = iface->load_from_file(impl, paths, size, NULL);

L1360load_from_memory call site:

// Before
handle = iface->load_from_memory(impl, name, buffer, size);

// After
handle = iface->load_from_memory(impl, name, buffer, size, NULL);

L1399load_from_package call site:

// Before
handle = iface->load_from_package(impl, path);

// After
handle = iface->load_from_package(impl, path, NULL);

Also add _ex variants of loader_impl_load_from_file, loader_impl_load_from_memory, loader_impl_load_from_package in both loader_impl.h and loader_impl.c that accept void *context and forward it to the interface call instead of NULL.

Depends on

Blocks

  • Sub-issue 4: Public metacall_load_from_*_ex API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions