Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package jsonrpc-glib for openSUSE:Factory 
checked in at 2021-09-29 20:18:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jsonrpc-glib (Old)
 and      /work/SRC/openSUSE:Factory/.jsonrpc-glib.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jsonrpc-glib"

Wed Sep 29 20:18:51 2021 rev:11 rq:921667 version:3.40.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/jsonrpc-glib/jsonrpc-glib.changes        
2020-11-23 10:31:28.061425555 +0100
+++ /work/SRC/openSUSE:Factory/.jsonrpc-glib.new.1899/jsonrpc-glib.changes      
2021-09-29 20:20:05.223090494 +0200
@@ -1,0 +2,6 @@
+Thu Sep 23 07:08:07 UTC 2021 - Bj??rn Lie <bjorn....@gmail.com>
+
+- Update to version 3.40.0:
+  + Add ability to inject variant into messages.
+
+-------------------------------------------------------------------

Old:
----
  jsonrpc-glib-3.38.0.tar.xz

New:
----
  jsonrpc-glib-3.40.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jsonrpc-glib.spec ++++++
--- /var/tmp/diff_new_pack.FfjdCt/_old  2021-09-29 20:20:05.675091149 +0200
+++ /var/tmp/diff_new_pack.FfjdCt/_new  2021-09-29 20:20:05.679091155 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package jsonrpc-glib
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,13 @@
 
 %define sover 1_0-1
 Name:           jsonrpc-glib
-Version:        3.38.0
+Version:        3.40.0
 Release:        0
 Summary:        Library to communicate with JSON-RPC based peers
 License:        LGPL-2.1-or-later
 Group:          Development/Libraries/GNOME
 URL:            https://gitlab.gnome.org/GNOME/jsonrpc-glib
-Source0:        
https://download.gnome.org/sources/jsonrpc-glib/3.38/%{name}-%{version}.tar.xz
+Source0:        
https://download.gnome.org/sources/jsonrpc-glib/3.40/%{name}-%{version}.tar.xz
 
 BuildRequires:  gtk-doc
 BuildRequires:  meson >= 0.49.2

++++++ jsonrpc-glib-3.38.0.tar.xz -> jsonrpc-glib-3.40.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/NEWS new/jsonrpc-glib-3.40.0/NEWS
--- old/jsonrpc-glib-3.38.0/NEWS        2020-09-12 20:45:46.068132200 +0200
+++ new/jsonrpc-glib-3.40.0/NEWS        2021-09-23 00:11:53.081877700 +0200
@@ -1,4 +1,10 @@
 ==============
+Version 3.40.0
+==============
+
+ ??? Add ability to inject variant into messages
+
+==============
 Version 3.38.0
 ==============
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/meson.build 
new/jsonrpc-glib-3.40.0/meson.build
--- old/jsonrpc-glib-3.38.0/meson.build 2020-09-12 20:45:46.069132000 +0200
+++ new/jsonrpc-glib-3.40.0/meson.build 2021-09-23 00:11:53.081877700 +0200
@@ -1,5 +1,5 @@
 project('jsonrpc-glib', 'c',
-          version: '3.38.0',
+          version: '3.40.0',
           license: 'LGPLv2.1+',
     meson_version: '>= 0.49.2',
   default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 
'c_std=gnu11' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/src/jsonrpc-message.c 
new/jsonrpc-glib-3.40.0/src/jsonrpc-message.c
--- old/jsonrpc-glib-3.38.0/src/jsonrpc-message.c       2020-09-12 
20:45:46.071132200 +0200
+++ new/jsonrpc-glib-3.40.0/src/jsonrpc-message.c       2021-09-23 
00:11:53.082877600 +0200
@@ -45,6 +45,7 @@
 #define IS_PUT_INT64(_any)   COMPARE_MAGIC(_any, PUT_INT64)
 #define IS_PUT_BOOLEAN(_any) COMPARE_MAGIC(_any, PUT_BOOLEAN)
 #define IS_PUT_DOUBLE(_any)  COMPARE_MAGIC(_any, PUT_DOUBLE)
+#define IS_PUT_VARIANT(_any) COMPARE_MAGIC(_any, PUT_VARIANT)
 
 #define IS_GET_STRING(_any)  COMPARE_MAGIC(_any, GET_STRING)
 #define IS_GET_STRV(_any)    COMPARE_MAGIC(_any, GET_STRV)
@@ -89,6 +90,12 @@
   if (!keyptr || keyptr->magic.bytes[0] == '}')
     EXIT;
 
+  if (IS_PUT_VARIANT (keyptr))
+    {
+      g_variant_builder_add (builder, "v", ((JsonrpcMessagePutVariant 
*)keyptr)->val);
+      EXIT;
+    }
+
   g_variant_builder_open (builder, G_VARIANT_TYPE ("{sv}"));
 
   /*
@@ -112,8 +119,14 @@
   switch (valptr->magic.bytes[0])
     {
     case '{':
-      g_variant_builder_open (builder, G_VARIANT_TYPE ("a{sv}"));
       param = va_arg (*args, gconstpointer);
+      /*
+       * Peek ahead if a possible GVariant will be injected
+       */
+      if (IS_PUT_VARIANT ((JsonrpcMessageAny *)param))
+        g_variant_builder_open (builder, G_VARIANT_TYPE ("v"));
+      else
+        g_variant_builder_open (builder, G_VARIANT_TYPE ("a{sv}"));
       jsonrpc_message_build_object (builder, param, args);
       g_variant_builder_close (builder);
       break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/src/jsonrpc-message.h 
new/jsonrpc-glib-3.40.0/src/jsonrpc-message.h
--- old/jsonrpc-glib-3.38.0/src/jsonrpc-message.h       2020-09-12 
20:45:46.072132000 +0200
+++ new/jsonrpc-glib-3.40.0/src/jsonrpc-message.h       2021-09-23 
00:11:53.082877600 +0200
@@ -122,6 +122,12 @@
 typedef struct
 {
   JsonrpcMessageMagic magic;
+  GVariant *val;
+} JsonrpcMessagePutVariant __attribute__((aligned (8)));
+
+typedef struct
+{
+  JsonrpcMessageMagic magic;
   GVariant **variantptr;
 } JsonrpcMessageGetVariant __attribute__((aligned (8)));
 
@@ -142,6 +148,7 @@
 #define _JSONRPC_MESSAGE_GET_DOUBLE_MAGIC  _JSONRPC_MAGIC("GETD")
 #define _JSONRPC_MESSAGE_GET_ITER_MAGIC    _JSONRPC_MAGIC("GETT")
 #define _JSONRPC_MESSAGE_GET_DICT_MAGIC    _JSONRPC_MAGIC("GETC")
+#define _JSONRPC_MESSAGE_PUT_VARIANT_MAGIC _JSONRPC_MAGIC("PUTV")
 #define _JSONRPC_MESSAGE_GET_VARIANT_MAGIC _JSONRPC_MAGIC("GETV")
 
 #define _JSONRPC_MESSAGE_PUT_STRING_MAGIC_C  _JSONRPC_MAGIC_C('P','U','T','S')
@@ -158,6 +165,7 @@
 #define _JSONRPC_MESSAGE_GET_DOUBLE_MAGIC_C  _JSONRPC_MAGIC_C('G','E','T','D')
 #define _JSONRPC_MESSAGE_GET_ITER_MAGIC_C    _JSONRPC_MAGIC_C('G','E','T','T')
 #define _JSONRPC_MESSAGE_GET_DICT_MAGIC_C    _JSONRPC_MAGIC_C('G','E','T','C')
+#define _JSONRPC_MESSAGE_PUT_VARIANT_MAGIC_C _JSONRPC_MAGIC_C('P','U','T','V')
 #define _JSONRPC_MESSAGE_GET_VARIANT_MAGIC_C _JSONRPC_MAGIC_C('G','E','T','V')
 
 #define JSONRPC_MESSAGE_NEW(first_, ...) \
@@ -205,6 +213,8 @@
 #define JSONRPC_MESSAGE_GET_DICT(_valptr) \
   (&((JsonrpcMessageGetDict) { .magic = {_JSONRPC_MESSAGE_GET_DICT_MAGIC_C}, 
.dictptr = _valptr }))
 
+#define JSONRPC_MESSAGE_PUT_VARIANT(_val) \
+  (&((JsonrpcMessagePutVariant) { .magic = 
{_JSONRPC_MESSAGE_PUT_VARIANT_MAGIC_C}, .val = _val }))
 #define JSONRPC_MESSAGE_GET_VARIANT(_valptr) \
   (&((JsonrpcMessageGetVariant) { .magic = 
{_JSONRPC_MESSAGE_GET_VARIANT_MAGIC_C}, .variantptr = _valptr }))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/src/jsonrpc-version-macros.h 
new/jsonrpc-glib-3.40.0/src/jsonrpc-version-macros.h
--- old/jsonrpc-glib-3.38.0/src/jsonrpc-version-macros.h        2020-09-12 
20:45:46.072132000 +0200
+++ new/jsonrpc-glib-3.40.0/src/jsonrpc-version-macros.h        2021-09-23 
00:11:53.082877600 +0200
@@ -43,6 +43,7 @@
 #define JSONRPC_VERSION_3_26 (G_ENCODE_VERSION (3, 26))
 #define JSONRPC_VERSION_3_28 (G_ENCODE_VERSION (3, 28))
 #define JSONRPC_VERSION_3_30 (G_ENCODE_VERSION (3, 30))
+#define JSONRPC_VERSION_3_40 (G_ENCODE_VERSION (3, 40))
 
 #if (JSONRPC_MINOR_VERSION == 99)
 # define JSONRPC_VERSION_CUR_STABLE (G_ENCODE_VERSION (JSONRPC_MAJOR_VERSION + 
1, 0))
@@ -155,4 +156,18 @@
 # define JSONRPC_AVAILABLE_IN_3_30                 _JSONRPC_EXTERN
 #endif
 
+#if JSONRPC_VERSION_MIN_REQUIRED >= JSONRPC_VERSION_3_40
+# define JSONRPC_DEPRECATED_IN_3_40                JSONRPC_DEPRECATED
+# define JSONRPC_DEPRECATED_IN_3_40_FOR(f)         JSONRPC_DEPRECATED_FOR(f)
+#else
+# define JSONRPC_DEPRECATED_IN_3_40                _JSONRPC_EXTERN
+# define JSONRPC_DEPRECATED_IN_3_40_FOR(f)         _JSONRPC_EXTERN
+#endif
+
+#if JSONRPC_VERSION_MAX_ALLOWED < JSONRPC_VERSION_3_40
+# define JSONRPC_AVAILABLE_IN_3_40                 JSONRPC_UNAVAILABLE(3, 40)
+#else
+# define JSONRPC_AVAILABLE_IN_3_40                 _JSONRPC_EXTERN
+#endif
+
 #endif /* JSONRPC_VERSION_MACROS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonrpc-glib-3.38.0/tests/test-message.c 
new/jsonrpc-glib-3.40.0/tests/test-message.c
--- old/jsonrpc-glib-3.38.0/tests/test-message.c        2020-09-12 
20:45:46.073132300 +0200
+++ new/jsonrpc-glib-3.40.0/tests/test-message.c        2021-09-23 
00:11:53.082877600 +0200
@@ -115,6 +115,7 @@
 test_extract_node (void)
 {
   g_autoptr(GVariant) node = NULL;
+  g_autoptr(GVariant) node2 = NULL;
   g_autoptr(GVariant) ar = NULL;
   gboolean r;
 
@@ -124,6 +125,13 @@
   r = JSONRPC_MESSAGE_PARSE (node, "foo", "{", "bar", 
JSONRPC_MESSAGE_GET_VARIANT (&ar), "}");
   g_assert (ar != NULL);
   g_assert_cmpint (r, ==, TRUE);
+
+  node = jsonrpc_message_new ("foo", "{", "bar", "[", 
JSONRPC_MESSAGE_PUT_INT32 (1), "]", "}", NULL);
+  g_assert (node != NULL);
+
+  node2 = JSONRPC_MESSAGE_NEW ("bar", JSONRPC_MESSAGE_PUT_INT32 (1));
+  node = JSONRPC_MESSAGE_NEW ("foo", "{", JSONRPC_MESSAGE_PUT_VARIANT 
(g_steal_pointer (&node2)), "}");
+  g_assert (node != NULL);
 }
 
 static void

Reply via email to