MySQL 8.0.40
Source Code Documentation
my_basename.h File Reference

A macro that gives FILE without the directory name (e.g. More...

Go to the source code of this file.

Macros

#define MY_BASENAME   (&__FILE__[basename_index(__FILE__, sizeof(__FILE__) - 1)])
 
#define LOG_SUBSYSTEM_TAG
 

Functions

static constexpr int basename_index (const char *const path, const int index)
 
constexpr const char * basename_prefix_eval (const char *const path)
 
constexpr int basename_prefix_find (const char *const path, const int index)
 

Detailed Description

A macro that gives FILE without the directory name (e.g.

foo.cc instead of ../sql/foo.cc), calculated compile-time. Note that the entire FILE string is still present in the binary; only the pointer is adjusted.

Macro Definition Documentation

◆ LOG_SUBSYSTEM_TAG

#define LOG_SUBSYSTEM_TAG
Value:
&__FILE__[basename_prefix_find(__FILE__, sizeof(__FILE__) - 1)])
constexpr const char * basename_prefix_eval(const char *const path)
Definition: my_basename.h:43
constexpr int basename_prefix_find(const char *const path, const int index)
Definition: my_basename.h:49

◆ MY_BASENAME

#define MY_BASENAME   (&__FILE__[basename_index(__FILE__, sizeof(__FILE__) - 1)])

Function Documentation

◆ basename_index()

static constexpr int basename_index ( const char *const  path,
const int  index 
)
staticconstexpr

◆ basename_prefix_eval()

constexpr const char * basename_prefix_eval ( const char *const  path)
constexpr

◆ basename_prefix_find()

constexpr int basename_prefix_find ( const char *const  path,
const int  index 
)
constexpr