don't put glib includes inside extern "C" blocks

see https://github.com/libvips/libvips/issues/1987
This commit is contained in:
John Cupitt 2021-02-09 16:07:51 +00:00
parent 1f4f975e7d
commit cfe50903df
2 changed files with 6 additions and 5 deletions

View File

@ -33,11 +33,12 @@
#ifndef IM_DISPATCH_H #ifndef IM_DISPATCH_H
#define IM_DISPATCH_H #define IM_DISPATCH_H
#include <glib-object.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /*__cplusplus*/ #endif /*__cplusplus*/
#include <glib-object.h>
#include <vips/vips.h> #include <vips/vips.h>
#include <vips/util.h> #include <vips/util.h>

View File

@ -80,10 +80,6 @@
#ifndef VIPS_VIPS_H #ifndef VIPS_VIPS_H
#define VIPS_VIPS_H #define VIPS_VIPS_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#include <glib.h> #include <glib.h>
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include <gmodule.h> #include <gmodule.h>
@ -93,6 +89,10 @@ extern "C" {
*/ */
#include <gio/gio.h> #include <gio/gio.h>
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
/* If we're being parsed by SWIG, remove gcc attributes. /* If we're being parsed by SWIG, remove gcc attributes.
*/ */
#ifdef SWIG #ifdef SWIG