libdrizzle Developer Documentation
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
libdrizzle
conn_local.h
Go to the documentation of this file.
1
/*
2
* Drizzle Client & Protocol Library
3
*
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
5
* All rights reserved.
6
*
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
9
*/
10
16
#ifndef __DRIZZLE_CONN_LOCAL_H
17
#define __DRIZZLE_CONN_LOCAL_H
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
35
DRIZZLE_LOCAL
36
void
drizzle_con_reset_addrinfo
(
drizzle_con_st
*con);
37
45
static
inline
bool
drizzle_state_none
(
drizzle_con_st
*con)
46
{
47
return
con->
state_current
== 0;
48
}
49
57
static
inline
void
drizzle_state_push
(
drizzle_con_st
*con,
58
drizzle_state_fn
*
function
)
59
{
60
/* The maximum stack depth can be determined at compile time, so bump this
61
constant if needed to avoid the dynamic memory management. */
62
assert(con->
state_current
<
DRIZZLE_STATE_STACK_SIZE
);
63
con->
state_stack
[con->
state_current
]=
function
;
64
con->
state_current
++;
65
}
66
73
static
inline
void
drizzle_state_pop
(
drizzle_con_st
*con)
74
{
75
con->
state_current
--;
76
}
77
84
static
inline
void
drizzle_state_reset
(
drizzle_con_st
*con)
85
{
86
con->
state_current
= 0;
87
}
88
91
#ifdef __cplusplus
92
}
93
#endif
94
95
#endif
/* __DRIZZLE_CONN_LOCAL_H */
Generated by
1.8.1.1