Bartleby 0.1.0
A symbol renaming toolkit
Loading...
Searching...
No Matches
Bartleby.h
Go to the documentation of this file.
1
15#ifndef SAQ_BARTLEBY_H
16#define SAQ_BARTLEBY_H
17
18#include <sys/types.h>
19
20#if (defined(__clang__) || (_GNUC__ >= 4))
21#define SAQ_BARTLEBY_API __attribute__((visibility("default")))
22#else
23#define SAQ_BARTLEBY_API
24#endif
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
37struct BartlebyHandle;
38
43
48
56 const char *prefix);
57
68 const void *s, const size_t n);
69
81 void **s, size_t *n);
82
83#ifdef __cplusplus
84} // extern "C"
85#endif
86
87#endif // SAQ_BARTLEBY_H
SAQ_BARTLEBY_API void saq_bartleby_free(struct BartlebyHandle *bh)
Frees a Bartleby handle.
Definition: Bartleby-c.cpp:51
#define SAQ_BARTLEBY_API
Definition: Bartleby.h:23
SAQ_BARTLEBY_API struct BartlebyHandle * saq_bartleby_new(void)
Allocates a new Bartleby handle.
Definition: Bartleby-c.cpp:47
SAQ_BARTLEBY_API int saq_bartleby_build_archive(struct BartlebyHandle *bh, void **s, size_t *n)
Builds the final archive and writes its content to a buffer.
Definition: Bartleby-c.cpp:98
SAQ_BARTLEBY_API int saq_bartleby_set_prefix(struct BartlebyHandle *bh, const char *prefix)
Applies a prefix to all global and defined symbols.
Definition: Bartleby-c.cpp:55
SAQ_BARTLEBY_API int saq_bartleby_add_binary(struct BartlebyHandle *bh, const void *s, const size_t n)
Adds a new binary to Bartleby.
Definition: Bartleby-c.cpp:69
Definition of the Bartleby handle.
Definition: Bartleby-c.cpp:40