libgimpbase: change gimpprotocol GPParamDefInt's members to gint64

so the full range of any unsigned int param spec's values fits.
This commit is contained in:
Michael Natterer 2019-08-10 16:25:22 +02:00
parent 4bafbeca1b
commit 299d657ff1
3 changed files with 26 additions and 23 deletions

View File

@ -779,12 +779,12 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
break;
case GP_PARAM_DEF_TYPE_INT:
if (! gimp_scanner_parse_int (scanner,
&param_def.meta.m_int.min_val) ||
! gimp_scanner_parse_int (scanner,
&param_def.meta.m_int.max_val) ||
! gimp_scanner_parse_int (scanner,
&param_def.meta.m_int.default_val))
if (! gimp_scanner_parse_int64 (scanner,
&param_def.meta.m_int.min_val) ||
! gimp_scanner_parse_int64 (scanner,
&param_def.meta.m_int.max_val) ||
! gimp_scanner_parse_int64 (scanner,
&param_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);

View File

@ -1049,14 +1049,14 @@ _gp_param_def_read (GIOChannel *channel,
break;
case GP_PARAM_DEF_TYPE_INT:
if (! _gimp_wire_read_int32 (channel,
(guint32 *) &param_def->meta.m_int.min_val, 1,
if (! _gimp_wire_read_int64 (channel,
(guint64 *) &param_def->meta.m_int.min_val, 1,
user_data) ||
! _gimp_wire_read_int32 (channel,
(guint32 *) &param_def->meta.m_int.max_val, 1,
! _gimp_wire_read_int64 (channel,
(guint64 *) &param_def->meta.m_int.max_val, 1,
user_data) ||
! _gimp_wire_read_int32 (channel,
(guint32 *) &param_def->meta.m_int.default_val, 1,
! _gimp_wire_read_int64 (channel,
(guint64 *) &param_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 *) &param_def->meta.m_int.min_val, 1,
if (! _gimp_wire_write_int64 (channel,
(guint64 *) &param_def->meta.m_int.min_val, 1,
user_data) ||
! _gimp_wire_write_int32 (channel,
(guint32 *) &param_def->meta.m_int.max_val, 1,
! _gimp_wire_write_int64 (channel,
(guint64 *) &param_def->meta.m_int.max_val, 1,
user_data) ||
! _gimp_wire_write_int32 (channel,
(guint32 *) &param_def->meta.m_int.default_val, 1,
! _gimp_wire_write_int64 (channel,
(guint64 *) &param_def->meta.m_int.default_val, 1,
user_data))
return FALSE;
break;

View File

@ -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