[gimp] libgimpbase: change gimpprotocol GPParamDefInt's members to gint64
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpbase: change gimpprotocol GPParamDefInt's members to gint64
- Date: Sat, 10 Aug 2019 14:27:24 +0000 (UTC)
commit 299d657ff139771292ce9a5897ec2ab4d47c11e1
Author: Michael Natterer <mitch gimp org>
Date: Sat Aug 10 16:25:22 2019 +0200
libgimpbase: change gimpprotocol GPParamDefInt's members to gint64
so the full range of any unsigned int param spec's values fits.
app/plug-in/plug-in-rc.c | 17 ++++++++++-------
libgimpbase/gimpprotocol.c | 24 ++++++++++++------------
libgimpbase/gimpprotocol.h | 8 ++++----
3 files changed, 26 insertions(+), 23 deletions(-)
---
diff --git a/app/plug-in/plug-in-rc.c b/app/plug-in/plug-in-rc.c
index 5b54587801..5e0bce294b 100644
--- a/app/plug-in/plug-in-rc.c
+++ b/app/plug-in/plug-in-rc.c
@@ -779,12 +779,12 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
break;
case GP_PARAM_DEF_TYPE_INT:
- if (! gimp_scanner_parse_int (scanner,
- ¶m_def.meta.m_int.min_val) ||
- ! gimp_scanner_parse_int (scanner,
- ¶m_def.meta.m_int.max_val) ||
- ! gimp_scanner_parse_int (scanner,
- ¶m_def.meta.m_int.default_val))
+ if (! gimp_scanner_parse_int64 (scanner,
+ ¶m_def.meta.m_int.min_val) ||
+ ! gimp_scanner_parse_int64 (scanner,
+ ¶m_def.meta.m_int.max_val) ||
+ ! gimp_scanner_parse_int64 (scanner,
+ ¶m_def.meta.m_int.default_val))
{
token = G_TOKEN_INT;
goto error;
@@ -1029,7 +1029,10 @@ plug_in_rc_write_proc_arg (GimpConfigWriter *writer,
break;
case GP_PARAM_DEF_TYPE_INT:
- gimp_config_writer_printf (writer, "%d %d %d",
+ gimp_config_writer_printf (writer,
+ "%" G_GINT64_FORMAT
+ " %" G_GINT64_FORMAT
+ " %" G_GINT64_FORMAT,
param_def.meta.m_int.min_val,
param_def.meta.m_int.max_val,
param_def.meta.m_int.default_val);
diff --git a/libgimpbase/gimpprotocol.c b/libgimpbase/gimpprotocol.c
index 12518d54af..3add813851 100644
--- a/libgimpbase/gimpprotocol.c
+++ b/libgimpbase/gimpprotocol.c
@@ -1049,14 +1049,14 @@ _gp_param_def_read (GIOChannel *channel,
break;
case GP_PARAM_DEF_TYPE_INT:
- if (! _gimp_wire_read_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.min_val, 1,
+ if (! _gimp_wire_read_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.min_val, 1,
user_data) ||
- ! _gimp_wire_read_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.max_val, 1,
+ ! _gimp_wire_read_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.max_val, 1,
user_data) ||
- ! _gimp_wire_read_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.default_val, 1,
+ ! _gimp_wire_read_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.default_val, 1,
user_data))
return FALSE;
break;
@@ -1331,14 +1331,14 @@ _gp_param_def_write (GIOChannel *channel,
break;
case GP_PARAM_DEF_TYPE_INT:
- if (! _gimp_wire_write_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.min_val, 1,
+ if (! _gimp_wire_write_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.min_val, 1,
user_data) ||
- ! _gimp_wire_write_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.max_val, 1,
+ ! _gimp_wire_write_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.max_val, 1,
user_data) ||
- ! _gimp_wire_write_int32 (channel,
- (guint32 *) ¶m_def->meta.m_int.default_val, 1,
+ ! _gimp_wire_write_int64 (channel,
+ (guint64 *) ¶m_def->meta.m_int.default_val, 1,
user_data))
return FALSE;
break;
diff --git a/libgimpbase/gimpprotocol.h b/libgimpbase/gimpprotocol.h
index 732f9c1b31..effb494616 100644
--- a/libgimpbase/gimpprotocol.h
+++ b/libgimpbase/gimpprotocol.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
/* Increment every time the protocol changes
*/
-#define GIMP_PROTOCOL_VERSION 0x0107
+#define GIMP_PROTOCOL_VERSION 0x0108
enum
@@ -143,9 +143,9 @@ struct _GPTileData
struct _GPParamDefInt
{
- gint32 min_val;
- gint32 max_val;
- gint32 default_val;
+ gint64 min_val;
+ gint64 max_val;
+ gint64 default_val;
};
struct _GPParamDefUnit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]