[gdk-pixbuf/ebassi/tiff-types] tiff: Use non-deprecated C99 integer types
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/ebassi/tiff-types] tiff: Use non-deprecated C99 integer types
- Date: Tue, 9 Nov 2021 14:04:00 +0000 (UTC)
commit d6445d9fc588239f8e595115161bb58a26e58166
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 9 13:46:43 2021 +0000
tiff: Use non-deprecated C99 integer types
The old `uint16` and `uint32` types have been deprecated in favour of
the C99 integer types `uint16_t` and `uint32_t`.
gdk-pixbuf/io-tiff.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c
index 5345c9b83..9368ddb48 100644
--- a/gdk-pixbuf/io-tiff.c
+++ b/gdk-pixbuf/io-tiff.c
@@ -29,6 +29,7 @@
#include "config.h"
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -97,13 +98,13 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
gint width, height, rowstride, bytes;
GdkPixbuf *pixbuf;
guint16 bits_per_sample = 0;
- uint16 orientation = 0;
- uint16 transform = 0;
- uint16 codec;
+ uint16_t orientation = 0;
+ uint16_t transform = 0;
+ uint16_t codec;
gchar *icc_profile_base64;
const gchar *icc_profile;
guint icc_profile_size;
- uint16 resolution_unit;
+ uint16_t resolution_unit;
gchar *density_str;
gint retval;
@@ -279,7 +280,7 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
if (context)
(* context->prepared_func) (pixbuf, NULL, context->user_data);
- if (!TIFFReadRGBAImageOriented (tiff, width, height, (uint32 *)pixels, ORIENTATION_TOPLEFT, 1)) {
+ if (!TIFFReadRGBAImageOriented (tiff, width, height, (uint32_t *)pixels, ORIENTATION_TOPLEFT, 1)) {
g_set_error_literal (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
@@ -951,7 +952,7 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
if (x_dpi != NULL && y_dpi != NULL) {
char *endptr = NULL;
- uint16 resolution_unit = RESUNIT_INCH;
+ uint16_t resolution_unit = RESUNIT_INCH;
float x_dpi_value, y_dpi_value;
x_dpi_value = strtol (x_dpi, &endptr, 10);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]