NetworkManager/libnm-glib
Thomas Haller e1c7a2b5d0 all: don't use gchar/gshort/gint/glong but C types
We commonly don't use the glib typedefs for char/short/int/long,
but their C types directly.

    $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l
    587
    $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l
    21114

One could argue that using the glib typedefs is preferable in
public API (of our glib based libnm library) or where it clearly
is related to glib, like during

  g_object_set (obj, PROPERTY, (gint) value, NULL);

However, that argument does not seem strong, because in practice we don't
follow that argument today, and seldomly use the glib typedefs.
Also, the style guide for this would be hard to formalize, because
"using them where clearly related to a glib" is a very loose suggestion.

Also note that glib typedefs will always just be typedefs of the
underlying C types. There is no danger of glib changing the meaning
of these typedefs (because that would be a major API break of glib).

A simple style guide is instead: don't use these typedefs.

No manual actions, I only ran the bash script:

  FILES=($(git ls-files '*.[hc]'))
  sed -i \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>  /\1   /g' \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \
      "${FILES[@]}"
2018-07-11 12:02:06 +02:00
..
tests build/meson: fix meson build for shared files 2018-05-31 15:59:38 +02:00
libnm-glib-test.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
libnm-glib-vpn.pc.in release: bump version to 0.9.0 2011-08-22 20:33:07 -05:00
libnm-glib-vpn.ver libnm-glib-vpn: add support for interactive secrets requests 2013-07-31 08:16:40 -05:00
libnm-glib.pc.in libnm-glib,libnm-util: -glib requires -util, -util requires NetworkManager 2013-03-14 10:23:19 -05:00
libnm-glib.ver libnm/libnm-glib: add NMClient.get_all_devices() method and AllDevices property 2015-12-04 12:16:41 +01:00
libnm_glib.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
libnm_glib.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
meson.build meson: run the check-export.sh in test phase 2018-06-28 20:38:52 +02:00
nm-access-point.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-access-point.h all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-active-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-active-connection.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-client.c all: use the elvis operator wherever possible 2018-05-10 14:36:58 +02:00
nm-client.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-dbus-helpers-private.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-dbus-helpers.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-device-adsl.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-adsl.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bond.c all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
nm-device-bond.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bridge.c all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
nm-device-bridge.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-bt.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-bt.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-ethernet.c doc: add units to some libnm (and libnm-glib) function docs 2018-05-23 16:17:03 +02:00
nm-device-ethernet.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-generic.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-generic.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-infiniband.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-infiniband.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-modem.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-modem.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-olpc-mesh.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-olpc-mesh.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-private.h libnm-glib: refactor _nm_device_type_for_path() 2015-11-25 11:39:57 +01:00
nm-device-team.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-team.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-vlan.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-vlan.h libnm-glib: add :parent property for VLAN devices 2014-11-24 10:33:22 +01:00
nm-device-wifi.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-device-wifi.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-device-wimax.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-device-wimax.h all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-device.c doc: add units to some libnm (and libnm-glib) function docs 2018-05-23 16:17:03 +02:00
nm-device.h libnm-glib/libnm: add support for "real" NMDevice property 2015-12-04 12:15:12 +01:00
nm-dhcp4-config.c libnm-glib: do not use deprecated Gtk-Doc Type: and Virtual: tags 2018-03-26 12:46:22 +02:00
nm-dhcp4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-dhcp6-config.c libnm-glib: do not use deprecated Gtk-Doc Type: and Virtual: tags 2018-03-26 12:46:22 +02:00
nm-dhcp6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-glib-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-glib-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-ip4-config.c doc: fix GTK-Doc NMRoute links 2018-05-11 16:49:25 +02:00
nm-ip4-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-ip6-config.c doc: fix GTK-Doc NMRoute links 2018-05-11 16:49:25 +02:00
nm-ip6-config.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-object-cache.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-object-cache.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-object-private.h libnm-glib: silence some build warnings 2016-11-21 13:53:03 +01:00
nm-object.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-object.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-remote-connection-private.h libnm-util, libnm-glib: whitespace fixes 2014-07-15 09:44:55 -04:00
nm-remote-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-remote-connection.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-remote-settings.c all: use the elvis operator wherever possible 2018-05-10 14:36:58 +02:00
nm-remote-settings.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-secret-agent.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-secret-agent.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-types-private.h libnm-glib: drop some unneeded code 2016-11-21 13:53:03 +01:00
nm-types.c libnm-glib: drop some unneeded code 2016-11-21 13:53:03 +01:00
nm-types.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-connection.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-connection.h libnm-util, libnm-glib: standardize copyright/license headers 2014-07-15 09:44:54 -04:00
nm-vpn-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-vpn-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-vpn-plugin-ui-interface.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin-ui-interface.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin-utils.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-vpn-plugin-utils.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-vpn-plugin.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-vpn-plugin.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-wimax-nsp.c all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-wimax-nsp.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00