Toggle main menu visibility
Main Page
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Files
File List
Globals
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
Variables
Typedefs
a
b
d
e
f
i
l
m
n
p
q
r
s
t
u
v
w
Enumerations
a
b
c
e
h
i
j
l
m
o
p
q
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
x
Macros
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
as_util.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2022 Aerospike, Inc.
3
*
4
* Portions may be licensed to Aerospike, Inc. under one or more contributor
5
* license agreements.
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
8
* use this file except in compliance with the License. You may obtain a copy of
9
* the License at http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
* License for the specific language governing permissions and limitations under
15
* the License.
16
*/
17
18
#pragma once
19
20
#include <stddef.h>
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
/******************************************************************************
27
* MACROS
28
******************************************************************************/
29
30
/**
31
* Calls a hook on a object.
32
* If hook not found, then return the default value.
33
*/
34
#define as_util_hook(hook,default,object,...) \
35
(object && object->hooks && object->hooks->hook ? object->hooks->hook(object, ##__VA_ARGS__) : default)
34
#define as_util_hook(hook,default,object,...) \
…
36
37
#define as_util_hook_ret_void(hook,object,...) \
38
if (object && object->hooks && object->hooks->hook) object->hooks->hook(object, ##__VA_ARGS__)
37
#define as_util_hook_ret_void(hook,object,...) \
…
39
40
/**
41
* Converts from an as_val.
42
*/
43
#define as_util_fromval(object,type_id,type) \
44
(object && as_val_type(object) == type_id ? (type *) object : NULL)
43
#define as_util_fromval(object,type_id,type) \
…
45
46
#ifdef __cplusplus
47
}
// end extern "C"
48
#endif
aerospike
as_util.h
Generated on Tue Apr 1 2025 17:42:44 for Aerospike C Client API by
1.10.0