<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/shared/nm-glib-aux/nm-shared-utils.c, branch bg/dhcp-shorten-hostname</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>shared,all: cleanup nm_utils_hashtable_equal*() functions</title>
<updated>2020-11-09T16:25:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-11-02T17:27:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a3aa3725e5faf707d76eaa1009a71152c37564dc'/>
<id>a3aa3725e5faf707d76eaa1009a71152c37564dc</id>
<content type='text'>
We have:

- nm_utils_hashtable_cmp(): this does a full cmp of two hash
  tables, with the intent to provide a stable sort order.
  It thus takes a GCompareDataFunc() argument.

- nm_utils_hashtable_cmp_equal(): this is like nm_utils_hashtable_cmp(),
  except that the caller won't get a compare value, only a boolean
  value that indicates equality.
  This was previously called nm_utils_hashtable_equal().

- nm_utils_hashtable_equal(): this takes a GEqualFunc function
  for comparing the values for equality. It takes thus
  a different kind of predicate, but otherwise is similar to
  nm_utils_hashtable_cmp_equal().
  This was previously called nm_utils_hash_table_equal().

Unify the naming of these functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have:

- nm_utils_hashtable_cmp(): this does a full cmp of two hash
  tables, with the intent to provide a stable sort order.
  It thus takes a GCompareDataFunc() argument.

- nm_utils_hashtable_cmp_equal(): this is like nm_utils_hashtable_cmp(),
  except that the caller won't get a compare value, only a boolean
  value that indicates equality.
  This was previously called nm_utils_hashtable_equal().

- nm_utils_hashtable_equal(): this takes a GEqualFunc function
  for comparing the values for equality. It takes thus
  a different kind of predicate, but otherwise is similar to
  nm_utils_hashtable_cmp_equal().
  This was previously called nm_utils_hash_table_equal().

Unify the naming of these functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: use GEqualFunc instead of NMUtilsHashTableEqualFunc typedef</title>
<updated>2020-11-09T16:25:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-11-02T18:04:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d52c3b3c94507c5dd2738c8d16782735886a53fe'/>
<id>d52c3b3c94507c5dd2738c8d16782735886a53fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: add nm_utils_strdict_clone() helper</title>
<updated>2020-11-09T16:25:24+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-11-07T18:18:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0cf4250021eb6f942baa4a6245668d769e0b67eb'/>
<id>0cf4250021eb6f942baa4a6245668d769e0b67eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: add nm_utils_named_value_clear_with_g_free() helper</title>
<updated>2020-11-09T16:25:24+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-11-06T15:29:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=571aeec933ac8bd62ee4888948bea4361316dd8b'/>
<id>571aeec933ac8bd62ee4888948bea4361316dd8b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: introduce opaque type NMUtilsUserData for nm_utils_user_data_pack()</title>
<updated>2020-10-22T15:38:08+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-10-22T14:25:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6e44842dc69d03549e1a3bd842988308d2969fd3'/>
<id>6e44842dc69d03549e1a3bd842988308d2969fd3</id>
<content type='text'>
This makes the usage slightly more type safe.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the usage slightly more type safe.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: automatically cast strv argument for nm_utils_strv_equal()/nm_utils_strv_cmp_n()</title>
<updated>2020-10-12T20:20:01+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-10-12T19:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=251ba8ea44fa2cd153e0bd914dde7f5ca9449292'/>
<id>251ba8ea44fa2cd153e0bd914dde7f5ca9449292</id>
<content type='text'>
It's cumbersome if we always need to cast our arguments for
the strv helper functions. Depending on the situation, we often
have a "char **" or a "const char *const*" argument.

Use NM_CAST_STRV_CC() macros instead. This macro uses C11's _Generic()
and casts types that are presumed to be safe. This tends to be less
typing and more type-safe, because you don't need an explicit C cast
(which would overrule any warning that the compiler might have for you).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's cumbersome if we always need to cast our arguments for
the strv helper functions. Depending on the situation, we often
have a "char **" or a "const char *const*" argument.

Use NM_CAST_STRV_CC() macros instead. This macro uses C11's _Generic()
and casts types that are presumed to be safe. This tends to be less
typing and more type-safe, because you don't need an explicit C cast
(which would overrule any warning that the compiler might have for you).
</pre>
</div>
</content>
</entry>
<entry>
<title>all/trivial: rename _nm_utils_strv_equal()/_nm_utils_strv_cmp_n() to have no leading underscore</title>
<updated>2020-10-12T20:18:26+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-10-12T19:50:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cbcfc58794f99f35805052500608f57d37ec9358'/>
<id>cbcfc58794f99f35805052500608f57d37ec9358</id>
<content type='text'>
The underscore somehow indicated that these would be an internal
function. Which they are in the sense that they are in "shared/nm-glib-aux/".
But they part of our internal helper functions, and in our code base
their use is no discouraged or "private.

Also, next I'll replace the function call with a macro, so, I will
have a need for the underscore name.

Rename.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The underscore somehow indicated that these would be an internal
function. Which they are in the sense that they are in "shared/nm-glib-aux/".
But they part of our internal helper functions, and in our code base
their use is no discouraged or "private.

Also, next I'll replace the function call with a macro, so, I will
have a need for the underscore name.

Rename.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: unify comment style for SPDX-License-Identifier tag</title>
<updated>2020-09-29T14:50:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-09-29T14:42:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=88071abb4355a7f680d87277272d2ba34a235a9b'/>
<id>88071abb4355a7f680d87277272d2ba34a235a9b</id>
<content type='text'>
Our coding style recommends C style comments (/* */) instead of C++
(//). Also, systemd (which we partly fork) uses C style comments for
the SPDX-License-Identifier.

Unify the style.

  $ sed -i '1 s#// SPDX-License-Identifier: \([^ ]\+\)$#/* SPDX-License-Identifier: \1 */#' -- $(git ls-files -- '*.[hc]' '*.[hc]pp')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our coding style recommends C style comments (/* */) instead of C++
(//). Also, systemd (which we partly fork) uses C style comments for
the SPDX-License-Identifier.

Unify the style.

  $ sed -i '1 s#// SPDX-License-Identifier: \([^ ]\+\)$#/* SPDX-License-Identifier: \1 */#' -- $(git ls-files -- '*.[hc]' '*.[hc]pp')
</pre>
</div>
</content>
</entry>
<entry>
<title>format: manually replace remaining tabs with spaces and reformat</title>
<updated>2020-09-29T07:12:27+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-09-29T07:02:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8841d529e1bd1d5b6733b0b6c17e06379229180d'/>
<id>8841d529e1bd1d5b6733b0b6c17e06379229180d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>format: replace tabs for indentation in code comments</title>
<updated>2020-09-28T14:07:52+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-09-28T12:50:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=740b092fda3d5f45102422f22884c88ea6c42858'/>
<id>740b092fda3d5f45102422f22884c88ea6c42858</id>
<content type='text'>
sed -i \
     -e 's/^'$'\t'' \*/     */g' \
     -e 's/^'$'\t\t'' \*/         */g' \
     -e 's/^'$'\t\t\t'' \*/             */g' \
     -e 's/^'$'\t\t\t\t'' \*/                 */g' \
     -e 's/^'$'\t\t\t\t\t'' \*/                     */g' \
     -e 's/^'$'\t\t\t\t\t\t'' \*/                         */g' \
     -e 's/^'$'\t\t\t\t\t\t\t'' \*/                             */g' \
     $(git ls-files -- '*.[hc]')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sed -i \
     -e 's/^'$'\t'' \*/     */g' \
     -e 's/^'$'\t\t'' \*/         */g' \
     -e 's/^'$'\t\t\t'' \*/             */g' \
     -e 's/^'$'\t\t\t\t'' \*/                 */g' \
     -e 's/^'$'\t\t\t\t\t'' \*/                     */g' \
     -e 's/^'$'\t\t\t\t\t\t'' \*/                         */g' \
     -e 's/^'$'\t\t\t\t\t\t\t'' \*/                             */g' \
     $(git ls-files -- '*.[hc]')
</pre>
</div>
</content>
</entry>
</feed>
