This repository was archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbstruct-private.h
More file actions
62 lines (51 loc) · 1.4 KB
/
dbstruct-private.h
File metadata and controls
62 lines (51 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* @file dbstruct-private.h
* @brief Declarations for DbStruct class
* @author Nicu Tofan <nicu.tofan@gmail.com>
* @copyright Copyright 2015 piles contributors. All rights reserved.
* This file is released under the
* [MIT License](http://opensource.org/licenses/mit-license.html)
*/
#ifndef GUARD_DBSTRUCT_PRIVATE_H_INCLUDE
#define GUARD_DBSTRUCT_PRIVATE_H_INCLUDE
#include <dbstruct/dbstruct-config.h>
#if 1
# define DBSTRUCT_DEBUGM printf
#else
# define DBSTRUCT_DEBUGM black_hole
#endif
#if 0
# define DBSTRUCT_TRACE_ENTRY printf("DBSTRUCT ENTRY %s in %s[%d]\n", __func__, __FILE__, __LINE__)
#else
# define DBSTRUCT_TRACE_ENTRY
#endif
#if 0
# define DBSTRUCT_TRACE_EXIT printf("DBSTRUCT EXIT %s in %s[%d]\n", __func__, __FILE__, __LINE__)
#else
# define DBSTRUCT_TRACE_EXIT
#endif
#ifdef _MSC_VER
# ifndef __func__
# define __func__ __FUNCTION__
# endif
#endif
#ifndef TMP_A
# define TMP_A(__s__) __s__.toLatin1 ().constData ()
#endif
#ifndef STRINGIFY
# define STRINGIFY(s) STRINGIFY_HELPER(s)
# define STRINGIFY_HELPER(s) #s
#endif
#ifndef DBG_ASSERT
#ifdef DBSTRUCT_DEBUG
# define DBG_ASSERT(a) if (!(a)) {\
printf("\nDBG_ASSERT Failed: " STRINGIFY(a) "\n"); \
printf("%s[%d]: %s\n\n",__FILE__, __LINE__, __func__); \
}
#else
# define DBG_ASSERT(a)
#endif
#endif
static inline void black_hole (...)
{}
#endif // GUARD_DBSTRUCT_PRIVATE_H_INCLUDE