remove redefinition of typedefs

We had this in a couple of places:

	typedef struct _A A;
	typedef struct _A A;

Some old gccs (eg. centos6) throw errors for this.

See https://github.com/libvips/libvips/issues/1774
This commit is contained in:
John Cupitt 2020-08-13 12:51:56 +01:00
parent fdded88cf7
commit b981911f67
4 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,6 @@
9/8/20 started 8.10.1
- fix markdown -> xml conversion in doc generation
- remove typedef redefinitions to please old gccs
24/1/20 started 8.10.0
- more conformat IIIF output from dzsave [regisrob]

View File

@ -62,7 +62,7 @@ typedef struct _VipsForeignSavePpm VipsForeignSavePpm;
typedef int (*VipsSavePpmFn)( VipsForeignSavePpm *, VipsImage *, VipsPel * );
typedef struct _VipsForeignSavePpm {
struct _VipsForeignSavePpm {
VipsForeignSave parent_object;
VipsTarget *target;
@ -74,7 +74,7 @@ typedef struct _VipsForeignSavePpm {
/* Deprecated.
*/
gboolean squash;
} VipsForeignSavePpm;
};
typedef VipsForeignSaveClass VipsForeignSavePpmClass;

View File

@ -133,8 +133,8 @@ typedef enum {
VIPS_ACCESS_LAST
} VipsAccess;
typedef void *(*VipsStartFn)( struct _VipsImage *out, void *a, void *b );
typedef int (*VipsGenerateFn)( struct _VipsRegion *out,
typedef void *(*VipsStartFn)( VipsImage *out, void *a, void *b );
typedef int (*VipsGenerateFn)( VipsRegion *out,
void *seq, void *a, void *b, gboolean *stop );
typedef int (*VipsStopFn)( void *seq, void *a, void *b );
@ -143,7 +143,7 @@ typedef int (*VipsStopFn)( void *seq, void *a, void *b );
*/
typedef struct _VipsProgress {
/*< private >*/
struct _VipsImage *im; /* Image we are part of */
VipsImage *im; /* Image we are part of */
/*< public >*/
int run; /* Time we have been running */
@ -169,7 +169,9 @@ typedef struct _VipsProgress {
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
VIPS_TYPE_IMAGE, VipsImageClass ))
typedef struct _VipsImage {
/* Matching typedef in basic.h.
*/
struct _VipsImage {
VipsObject parent_instance;
/*< private >*/
@ -281,7 +283,7 @@ typedef struct _VipsImage {
/* The VipsImage (if any) we should signal eval progress on.
*/
struct _VipsImage *progress_signal;
VipsImage *progress_signal;
/* Record the file length here. We use this to stop ourselves mapping
* things beyond the end of the file in the case that the file has
@ -309,7 +311,7 @@ typedef struct _VipsImage {
*/
gboolean delete_on_close;
char *delete_on_close_filename;
} VipsImage;
};
typedef struct _VipsImageClass {
VipsObjectClass parent_class;
@ -519,7 +521,7 @@ void vips_value_set_array_image( GValue *value, int n );
/* Defined in reorder.c, but really a function on image.
*/
int vips_reorder_prepare_many( VipsImage *image,
struct _VipsRegion **regions, VipsRect *r );
VipsRegion **regions, VipsRect *r );
void vips_reorder_margin_hint( VipsImage *image, int margin );
#ifdef __cplusplus

View File

@ -77,8 +77,10 @@ typedef enum {
} VipsRegionShrink;
/* Sub-area of image.
*
* Matching typedef in basic.h.
*/
typedef struct _VipsRegion {
struct _VipsRegion {
VipsObject parent_object;
/*< public >*/
@ -112,7 +114,7 @@ typedef struct _VipsRegion {
* dropped.
*/
gboolean invalid;
} VipsRegion;
};
typedef struct _VipsRegionClass {
VipsObjectClass parent_class;