qualcomm/qbox
Loading...
Searching...
No Matches
glib.h
1
/*
2
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. All Rights Reserved.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause-Clear
5
*
6
* Forward-decl-only glib.h shim on qbox's PUBLIC include path, before the
7
* system glib path, for both build and install interfaces. This also lets
8
* find_package(qbox) consumers build without real glib.
9
*
10
* Why: <libqemu/libqemu.h> opens an extern "C" block and, through its
11
* generated typedefs.h, includes qemu-plugin.h, which includes <glib.h>.
12
* Modern glib.h defines C++ inline template functions (g_steal_pointer,
13
* ...), which are illegal inside extern "C" ("template with C linkage").
14
* Putting this shim first makes that include resolve here instead. libqemu's
15
* public API uses GArray and GByteArray only as opaque pointers, so these
16
* forward declarations suffice; neither qbox nor its consumers use real glib
17
* internals.
18
*/
19
#ifndef GLIB_QBOX_SHIM_H
20
#define GLIB_QBOX_SHIM_H
21
22
typedef
struct
_GArray GArray;
23
typedef
struct
_GByteArray GByteArray;
24
25
#endif
qemu-components
common
include
glib_shim
glib.h
Generated by
1.15.0