C Driver API 3.0.0
API for the NuoDB C Driver Library
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1/* (C) Copyright 2015-2023 Dassault Systemes SE. All Rights Reserved. */
2
3#ifndef _NUODB_UTILS_H_
4#define _NUODB_UTILS_H_ 1
5
12#include <stddef.h>
13
14#define NUODB_CDRIVER_VERSION "3.0.0"
15#define NUODB_CDRIVER_MAJOR 3
16#define NUODB_CDRIVER_MINOR 0
17#define NUODB_CDRIVER_PATCH 0
18
19#if defined(NUODB_CAPI_EXPORT) && defined(NUODB_CAPI_STATIC)
20# error Both NUODB_CAPI_EXPORT and NUODB_CAPI_STATIC defined in the same translation unit
21#endif
22
23#if defined(_WIN32)
24# define NUODB_CAPI_STDCALL __stdcall
25# if defined(NUODB_CAPI_EXPORT)
26# define NUODB_CAPI __declspec(dllexport)
27# elif defined(NUODB_CAPI_STATIC)
28# define NUODB_CAPI
29# else
30# define NUODB_CAPI __declspec(dllimport)
31# endif
32#else
33# define NUODB_CAPI_STDCALL
34# if __GNUC__ >= 4
35# define NUODB_CAPI __attribute__((visibility("default")))
36# else
37# define NUODB_CAPI
38# endif
39#endif
40
41#define NUODB_CAPICALL NUODB_CAPI_STDCALL
42
43/* c-driver */
44#ifdef __cplusplus
45extern "C" {
46#endif
47
49typedef unsigned char nuodb_bool_t;
50#define NUODB_TRUE 1
51#define NUODB_FALSE 0
52
53/*
54 * These methods are DEPRECATED and WILL BE REMOVED from a future version.
55 * DO NOT USE!
56 */
57NUODB_CAPI void* NUODB_CAPICALL NuoDB_alloc(size_t size);
58NUODB_CAPI void NUODB_CAPICALL NuoDB_free(void* ptr);
59
60#ifdef __cplusplus
61} /* extern "C" { */
62#endif
63
64#endif /* end of: #ifndef _NUODB_UTILS_H_ */
unsigned char nuodb_bool_t
NuoDB boolean type.
Definition utils.h:49