rlib
Convenience library for useful things
Loading...
Searching...
No Matches
rmodule.h
Go to the documentation of this file.
1/* RLIB - Convenience library for useful things
2 * Copyright (C) 2015-2017 Haakon Sporsheim <haakon.sporsheim@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3.0 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library.
16 * See the COPYING file at the root of the source repository.
17 */
18#ifndef __R_MODULE_H__
19#define __R_MODULE_H__
20
21#if !defined(__RLIB_H_INCLUDE_GUARD__) && !defined(RLIB_COMPILATION)
22#error "#include <rlib.h> only please."
23#endif
24
31#include <rlib/rtypes.h>
32
34
51
57
74
89 const rchar * name, rssize nsize, rsize * secsize);
90
91R_END_DECLS
92
95#endif /* __R_MODULE_H__ */
#define R_API
Public-API decoration: resolves to R_API_EXPORT while building rlib and R_API_IMPORT for consumers.
Definition rmacros.h:115
#define R_BEGIN_DECLS
Open an extern "C" block under C++ (no-op in C).
Definition rmacros.h:196
rpointer r_module_find_section(RMODULE mod, const rchar *name, rssize nsize, rsize *secsize)
Locate a named section within mod's loaded image.
RMODULE r_module_open(const rchar *path, rboolean lazy, RModuleError *err)
Open the shared library at path.
rpointer RMODULE
Opaque module handle returned by r_module_open.
Definition rmodule.h:50
RModuleError
Result of r_module_open.
Definition rmodule.h:53
void r_module_close(RMODULE mod)
Close mod and release any backing OS resources.
rpointer r_module_lookup(RMODULE mod, const rchar *sym)
Resolve symbol sym in mod.
@ R_MODULE_ERROR_NOT_FOUND
Definition rmodule.h:55
@ R_MODULE_ERROR_OK
Definition rmodule.h:54
char rchar
Default character type (char).
Definition rtypes.h:137
int rboolean
Boolean type (typedef'd to int).
Definition rtypes.h:59
void * rpointer
Generic pointer (alias for void *).
Definition rtypes.h:327
unsigned long rsize
Unsigned pointer-sized size type (like size_t).
Definition rtypes.h:290
signed long rssize
Signed pointer-sized size type (like ssize_t).
Definition rtypes.h:291
Foundational type aliases used by every rlib header.