33#ifndef WRAPPER_FUNCTIONS_INCLUDED
34#define WRAPPER_FUNCTIONS_INCLUDED
37#ifndef STANDALONE_BINLOG
62#define BAPI_ASSERT(x) assert(x)
63#define BAPI_PRINT(name, params) DBUG_PRINT(name, params)
64#define BAPI_ENTER(x) DBUG_ENTER(x)
65#define BAPI_RETURN(x) DBUG_RETURN(x)
66#define BAPI_TRACE DBUG_TRACE
67#define BAPI_VOID_RETURN DBUG_VOID_RETURN
68#define BAPI_LOG(x, y) DBUG_LOG(x, y)
69#define BAPI_VAR(v) DBUG_VAR(v)
71#define BAPI_ASSERT(x) assert(x)
72#define BAPI_PRINT(name, params) \
75#define BAPI_ENTER(x) \
78#define BAPI_RETURN(x) return (x)
82#define BAPI_VOID_RETURN return
83#define BAPI_LOG(x, y) \
89#define BAPI_ASSERT(x) \
92#define BAPI_PRINT(name, params) \
95#define BAPI_ENTER(x) \
98#define BAPI_RETURN(x) return (x)
102#define BAPI_VOID_RETURN return
103#define BAPI_LOG(x, y) \
106#define BAPI_VAR(v) ""
122inline char *strndup(
const char *s,
size_t n) {
124 size_t len = strlen(s);
126 if (
n < len) len =
n;
132 return (
char *)memcpy(
result, s, len);
154 return strndup(destination,
n);
175 if (dest) memcpy(dest,
source, len);
193 void *dest =
nullptr;
#define MY_WME
Definition: my_sys.h:123
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
static int flags[50]
Definition: hp_test1.cc:40
#define malloc(A)
Definition: lexyy.cc:914
#define free(A)
Definition: lexyy.cc:915
#define MYF(v)
Definition: my_inttypes.h:97
void * my_malloc(PSI_memory_key key, size_t size, int flags)
Allocates size bytes of memory.
Definition: my_memory.cc:57
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
Common header for many mysys elements.
struct result result
Definition: result.h:34
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42
void * my_memdup(PSI_memory_key key, const void *from, size_t length, myf_t flags)
Definition: my_malloc.cc:540
char * my_strndup(PSI_memory_key key, const char *from, size_t length, myf_t flags)
Definition: my_malloc.cc:556
PSI_memory_key key_memory_log_event
Definition: log_event.cc:181
const char * bapi_strndup(const char *destination, size_t n)
This is a wrapper function, and returns a pointer to a new string which is a duplicate of the input s...
Definition: wrapper_functions.h:149
void * bapi_malloc(size_t size, int flags)
This is a wrapper function in order to allocate memory from the heap in the binlogevent library.
Definition: wrapper_functions.h:192
void * bapi_memdup(const void *source, size_t len)
This is a wrapper function, and returns a pointer to a new memory with the contents copied from the i...
Definition: wrapper_functions.h:168
void bapi_free(void *ptr)
This is a wrapper function in order to free the memory allocated from the heap in the binlogevent lib...
Definition: wrapper_functions.h:212
int n
Definition: xcom_base.cc:509