Program Listing for File loader.h

Return to documentation for file (api/include/pntos/loader.h)

#pragma once

#include <pntos/annotations.h>
#include <pntos/stdint.h>
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

PNTOS_ASSUME_NONNULL_BEGIN

#define PNTOS_LOADER_API_VERSION 2


/* Expand a token to be a quoted string */
#define PNTOS_STR_EXPAND(tok) #tok

typedef struct PntosPluginsDescription {
    uint32_t loader_api_version;

    uint32_t plugin_api_version;

    struct PntosPluginArray* (*plugins_loader)(void);

} PntosPluginsDescription;


#ifndef PNTOS_STATIC_BUILD
#   define PNTOS_PLUGIN_MAGIC_SYMBOL_STR PNTOS_STR_EXPAND(PNTOS_PLUGIN_MAGIC_SYMBOL)
#endif

PNTOS_ASSUME_NONNULL_END

#ifdef __cplusplus
}
#endif