all: add trailing semicolon to NM_AUTO_DEFINE_FCN_*() uses

This commit is contained in:
Thomas Haller 2020-07-19 11:40:50 +02:00
parent 8bd2673484
commit b17e3cf707
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
15 changed files with 47 additions and 47 deletions

View file

@ -120,7 +120,7 @@ _add_connection_info_free (AddConnectionInfo *info)
nm_g_slice_free (info); nm_g_slice_free (info);
} }
NM_AUTO_DEFINE_FCN (AddConnectionInfo *, _nm_auto_free_add_connection_info, _add_connection_info_free) NM_AUTO_DEFINE_FCN (AddConnectionInfo *, _nm_auto_free_add_connection_info, _add_connection_info_free);
#define nm_auto_free_add_connection_info nm_auto (_nm_auto_free_add_connection_info) #define nm_auto_free_add_connection_info nm_auto (_nm_auto_free_add_connection_info)

View file

@ -1893,7 +1893,7 @@ add_and_activate_info_free (AddAndActivateInfo *info)
nm_g_slice_free (info); nm_g_slice_free (info);
} }
NM_AUTO_DEFINE_FCN0 (AddAndActivateInfo *, _nm_auto_free_add_and_activate_info, add_and_activate_info_free) NM_AUTO_DEFINE_FCN0 (AddAndActivateInfo *, _nm_auto_free_add_and_activate_info, add_and_activate_info_free);
#define nm_auto_free_add_and_activate_info nm_auto (_nm_auto_free_add_and_activate_info) #define nm_auto_free_add_and_activate_info nm_auto (_nm_auto_free_add_and_activate_info)
static void static void
@ -2274,7 +2274,7 @@ modify_info_free (ModifyInfo *info)
nm_g_slice_free (info); nm_g_slice_free (info);
} }
NM_AUTO_DEFINE_FCN_VOID0 (ModifyInfo *, _auto_free_modify_info, modify_info_free) NM_AUTO_DEFINE_FCN_VOID0 (ModifyInfo *, _auto_free_modify_info, modify_info_free);
static void static void
modify_reapply_cb (GObject *object, GAsyncResult *result, gpointer user_data) modify_reapply_cb (GObject *object, GAsyncResult *result, gpointer user_data)

View file

@ -646,7 +646,7 @@ gboolean nm_sock_addr_endpoint_get_fixed_sockaddr (NMSockAddrEndpoint *self,
gpointer sockaddr); gpointer sockaddr);
#define nm_auto_unref_sockaddrendpoint nm_auto(_nm_auto_unref_sockaddrendpoint) #define nm_auto_unref_sockaddrendpoint nm_auto(_nm_auto_unref_sockaddrendpoint)
NM_AUTO_DEFINE_FCN0 (NMSockAddrEndpoint *, _nm_auto_unref_sockaddrendpoint, nm_sock_addr_endpoint_unref) NM_AUTO_DEFINE_FCN0 (NMSockAddrEndpoint *, _nm_auto_unref_sockaddrendpoint, nm_sock_addr_endpoint_unref);
/*****************************************************************************/ /*****************************************************************************/

View file

@ -19,31 +19,31 @@
/****************************************************************************/ /****************************************************************************/
#define nm_auto_unref_ip_address nm_auto (_nm_ip_address_unref) #define nm_auto_unref_ip_address nm_auto (_nm_ip_address_unref)
NM_AUTO_DEFINE_FCN0 (NMIPAddress *, _nm_ip_address_unref, nm_ip_address_unref) NM_AUTO_DEFINE_FCN0 (NMIPAddress *, _nm_ip_address_unref, nm_ip_address_unref);
#define nm_auto_unref_ip_route nm_auto (_nm_auto_unref_ip_route) #define nm_auto_unref_ip_route nm_auto (_nm_auto_unref_ip_route)
NM_AUTO_DEFINE_FCN0 (NMIPRoute *, _nm_auto_unref_ip_route, nm_ip_route_unref) NM_AUTO_DEFINE_FCN0 (NMIPRoute *, _nm_auto_unref_ip_route, nm_ip_route_unref);
#define nm_auto_unref_ip_routing_rule nm_auto(_nm_auto_unref_ip_routing_rule) #define nm_auto_unref_ip_routing_rule nm_auto(_nm_auto_unref_ip_routing_rule)
NM_AUTO_DEFINE_FCN0 (NMIPRoutingRule *, _nm_auto_unref_ip_routing_rule, nm_ip_routing_rule_unref) NM_AUTO_DEFINE_FCN0 (NMIPRoutingRule *, _nm_auto_unref_ip_routing_rule, nm_ip_routing_rule_unref);
#define nm_auto_unref_sriov_vf nm_auto (_nm_auto_unref_sriov_vf) #define nm_auto_unref_sriov_vf nm_auto (_nm_auto_unref_sriov_vf)
NM_AUTO_DEFINE_FCN0 (NMSriovVF *, _nm_auto_unref_sriov_vf, nm_sriov_vf_unref) NM_AUTO_DEFINE_FCN0 (NMSriovVF *, _nm_auto_unref_sriov_vf, nm_sriov_vf_unref);
#define nm_auto_unref_tc_qdisc nm_auto (_nm_auto_unref_tc_qdisc) #define nm_auto_unref_tc_qdisc nm_auto (_nm_auto_unref_tc_qdisc)
NM_AUTO_DEFINE_FCN0 (NMTCQdisc *, _nm_auto_unref_tc_qdisc, nm_tc_qdisc_unref) NM_AUTO_DEFINE_FCN0 (NMTCQdisc *, _nm_auto_unref_tc_qdisc, nm_tc_qdisc_unref);
#define nm_auto_unref_tc_tfilter nm_auto (_nm_auto_unref_tc_tfilter) #define nm_auto_unref_tc_tfilter nm_auto (_nm_auto_unref_tc_tfilter)
NM_AUTO_DEFINE_FCN0 (NMTCTfilter *, _nm_auto_unref_tc_tfilter, nm_tc_tfilter_unref) NM_AUTO_DEFINE_FCN0 (NMTCTfilter *, _nm_auto_unref_tc_tfilter, nm_tc_tfilter_unref);
#define nm_auto_unref_bridge_vlan nm_auto (_nm_auto_unref_bridge_vlan) #define nm_auto_unref_bridge_vlan nm_auto (_nm_auto_unref_bridge_vlan)
NM_AUTO_DEFINE_FCN0 (NMBridgeVlan *, _nm_auto_unref_bridge_vlan, nm_bridge_vlan_unref) NM_AUTO_DEFINE_FCN0 (NMBridgeVlan *, _nm_auto_unref_bridge_vlan, nm_bridge_vlan_unref);
#define nm_auto_unref_team_link_watcher nm_auto (_nm_auto_unref_team_link_watcher) #define nm_auto_unref_team_link_watcher nm_auto (_nm_auto_unref_team_link_watcher)
NM_AUTO_DEFINE_FCN0 (NMTeamLinkWatcher *, _nm_auto_unref_team_link_watcher, nm_team_link_watcher_unref) NM_AUTO_DEFINE_FCN0 (NMTeamLinkWatcher *, _nm_auto_unref_team_link_watcher, nm_team_link_watcher_unref);
#define nm_auto_unref_wgpeer nm_auto (_nm_auto_unref_wgpeer) #define nm_auto_unref_wgpeer nm_auto (_nm_auto_unref_wgpeer)
NM_AUTO_DEFINE_FCN0 (NMWireGuardPeer *, _nm_auto_unref_wgpeer, nm_wireguard_peer_unref) NM_AUTO_DEFINE_FCN0 (NMWireGuardPeer *, _nm_auto_unref_wgpeer, nm_wireguard_peer_unref);
/****************************************************************************/ /****************************************************************************/

View file

@ -127,7 +127,7 @@ NMTeamSetting *nm_team_setting_new (gboolean is_port,
void nm_team_setting_free (NMTeamSetting *self); void nm_team_setting_free (NMTeamSetting *self);
NM_AUTO_DEFINE_FCN0 (NMTeamSetting *, _nm_auto_free_team_setting, nm_team_setting_free) NM_AUTO_DEFINE_FCN0 (NMTeamSetting *, _nm_auto_free_team_setting, nm_team_setting_free);
#define nm_auto_free_team_setting nm_auto (_nm_auto_free_team_setting) #define nm_auto_free_team_setting nm_auto (_nm_auto_free_team_setting)
/*****************************************************************************/ /*****************************************************************************/

View file

@ -694,7 +694,7 @@ NMLDBusObject *nml_dbus_object_ref (NMLDBusObject *dbobj);
void nml_dbus_object_unref (NMLDBusObject *dbobj); void nml_dbus_object_unref (NMLDBusObject *dbobj);
NM_AUTO_DEFINE_FCN0 (NMLDBusObject *, _nm_auto_unref_nml_dbusobj, nml_dbus_object_unref) NM_AUTO_DEFINE_FCN0 (NMLDBusObject *, _nm_auto_unref_nml_dbusobj, nml_dbus_object_unref);
#define nm_auto_unref_nml_dbusobj nm_auto (_nm_auto_unref_nml_dbusobj) #define nm_auto_unref_nml_dbusobj nm_auto (_nm_auto_unref_nml_dbusobj)
gpointer nml_dbus_object_get_property_location (NMLDBusObject *dbobj, gpointer nml_dbus_object_get_property_location (NMLDBusObject *dbobj,

View file

@ -22,7 +22,7 @@
n = json_object_iter_next(object, json_object_key_to_iter(key))) n = json_object_iter_next(object, json_object_key_to_iter(key)))
#endif #endif
NM_AUTO_DEFINE_FCN0 (json_t *, _nm_auto_decref_json, json_decref) NM_AUTO_DEFINE_FCN0 (json_t *, _nm_auto_decref_json, json_decref);
#define nm_auto_decref_json nm_auto(_nm_auto_decref_json) #define nm_auto_decref_json nm_auto(_nm_auto_decref_json)
#endif /* WITH_JANSON */ #endif /* WITH_JANSON */

View file

@ -44,7 +44,7 @@
* Call g_free() on a variable location when it goes out of scope. * Call g_free() on a variable location when it goes out of scope.
*/ */
#define gs_free nm_auto(gs_local_free) #define gs_free nm_auto(gs_local_free)
NM_AUTO_DEFINE_FCN_VOID0 (void *, gs_local_free, g_free) NM_AUTO_DEFINE_FCN_VOID0 (void *, gs_local_free, g_free);
/** /**
* gs_unref_object: * gs_unref_object:
@ -54,7 +54,7 @@ NM_AUTO_DEFINE_FCN_VOID0 (void *, gs_local_free, g_free)
* %NULL. * %NULL.
*/ */
#define gs_unref_object nm_auto(gs_local_obj_unref) #define gs_unref_object nm_auto(gs_local_obj_unref)
NM_AUTO_DEFINE_FCN_VOID0 (GObject *, gs_local_obj_unref, g_object_unref) NM_AUTO_DEFINE_FCN_VOID0 (GObject *, gs_local_obj_unref, g_object_unref);
/** /**
* gs_unref_variant: * gs_unref_variant:
@ -64,7 +64,7 @@ NM_AUTO_DEFINE_FCN_VOID0 (GObject *, gs_local_obj_unref, g_object_unref)
* %NULL. * %NULL.
*/ */
#define gs_unref_variant nm_auto(gs_local_variant_unref) #define gs_unref_variant nm_auto(gs_local_variant_unref)
NM_AUTO_DEFINE_FCN0 (GVariant *, gs_local_variant_unref, g_variant_unref) NM_AUTO_DEFINE_FCN0 (GVariant *, gs_local_variant_unref, g_variant_unref);
/** /**
* gs_unref_array: * gs_unref_array:
@ -75,7 +75,7 @@ NM_AUTO_DEFINE_FCN0 (GVariant *, gs_local_variant_unref, g_variant_unref)
*/ */
#define gs_unref_array nm_auto(gs_local_array_unref) #define gs_unref_array nm_auto(gs_local_array_unref)
NM_AUTO_DEFINE_FCN0 (GArray *, gs_local_array_unref, g_array_unref) NM_AUTO_DEFINE_FCN0 (GArray *, gs_local_array_unref, g_array_unref);
/** /**
* gs_unref_ptrarray: * gs_unref_ptrarray:
@ -86,7 +86,7 @@ NM_AUTO_DEFINE_FCN0 (GArray *, gs_local_array_unref, g_array_unref)
*/ */
#define gs_unref_ptrarray nm_auto(gs_local_ptrarray_unref) #define gs_unref_ptrarray nm_auto(gs_local_ptrarray_unref)
NM_AUTO_DEFINE_FCN0 (GPtrArray *, gs_local_ptrarray_unref, g_ptr_array_unref) NM_AUTO_DEFINE_FCN0 (GPtrArray *, gs_local_ptrarray_unref, g_ptr_array_unref);
/** /**
* gs_unref_hashtable: * gs_unref_hashtable:
@ -96,7 +96,7 @@ NM_AUTO_DEFINE_FCN0 (GPtrArray *, gs_local_ptrarray_unref, g_ptr_array_unref)
* be %NULL. * be %NULL.
*/ */
#define gs_unref_hashtable nm_auto(gs_local_hashtable_unref) #define gs_unref_hashtable nm_auto(gs_local_hashtable_unref)
NM_AUTO_DEFINE_FCN0 (GHashTable *, gs_local_hashtable_unref, g_hash_table_unref) NM_AUTO_DEFINE_FCN0 (GHashTable *, gs_local_hashtable_unref, g_hash_table_unref);
/** /**
* gs_free_slist: * gs_free_slist:
@ -105,7 +105,7 @@ NM_AUTO_DEFINE_FCN0 (GHashTable *, gs_local_hashtable_unref, g_hash_table_unref)
* of scope. * of scope.
*/ */
#define gs_free_slist nm_auto(gs_local_free_slist) #define gs_free_slist nm_auto(gs_local_free_slist)
NM_AUTO_DEFINE_FCN0 (GSList *, gs_local_free_slist, g_slist_free) NM_AUTO_DEFINE_FCN0 (GSList *, gs_local_free_slist, g_slist_free);
/** /**
* gs_unref_bytes: * gs_unref_bytes:
@ -115,7 +115,7 @@ NM_AUTO_DEFINE_FCN0 (GSList *, gs_local_free_slist, g_slist_free)
* be %NULL. * be %NULL.
*/ */
#define gs_unref_bytes nm_auto(gs_local_bytes_unref) #define gs_unref_bytes nm_auto(gs_local_bytes_unref)
NM_AUTO_DEFINE_FCN0 (GBytes *, gs_local_bytes_unref, g_bytes_unref) NM_AUTO_DEFINE_FCN0 (GBytes *, gs_local_bytes_unref, g_bytes_unref);
/** /**
* gs_strfreev: * gs_strfreev:
@ -123,7 +123,7 @@ NM_AUTO_DEFINE_FCN0 (GBytes *, gs_local_bytes_unref, g_bytes_unref)
* Call g_strfreev() on a variable location when it goes out of scope. * Call g_strfreev() on a variable location when it goes out of scope.
*/ */
#define gs_strfreev nm_auto(gs_local_strfreev) #define gs_strfreev nm_auto(gs_local_strfreev)
NM_AUTO_DEFINE_FCN0 (char **, gs_local_strfreev, g_strfreev) NM_AUTO_DEFINE_FCN0 (char **, gs_local_strfreev, g_strfreev);
/** /**
* gs_free_error: * gs_free_error:
@ -131,7 +131,7 @@ NM_AUTO_DEFINE_FCN0 (char **, gs_local_strfreev, g_strfreev)
* Call g_error_free() on a variable location when it goes out of scope. * Call g_error_free() on a variable location when it goes out of scope.
*/ */
#define gs_free_error nm_auto(gs_local_free_error) #define gs_free_error nm_auto(gs_local_free_error)
NM_AUTO_DEFINE_FCN0 (GError *, gs_local_free_error, g_error_free) NM_AUTO_DEFINE_FCN0 (GError *, gs_local_free_error, g_error_free);
/** /**
* gs_unref_keyfile: * gs_unref_keyfile:
@ -139,7 +139,7 @@ NM_AUTO_DEFINE_FCN0 (GError *, gs_local_free_error, g_error_free)
* Call g_key_file_unref() on a variable location when it goes out of scope. * Call g_key_file_unref() on a variable location when it goes out of scope.
*/ */
#define gs_unref_keyfile nm_auto(gs_local_keyfile_unref) #define gs_unref_keyfile nm_auto(gs_local_keyfile_unref)
NM_AUTO_DEFINE_FCN0 (GKeyFile *, gs_local_keyfile_unref, g_key_file_unref) NM_AUTO_DEFINE_FCN0 (GKeyFile *, gs_local_keyfile_unref, g_key_file_unref);
/*****************************************************************************/ /*****************************************************************************/
@ -151,26 +151,26 @@ NM_AUTO_DEFINE_FCN0 (GKeyFile *, gs_local_keyfile_unref, g_key_file_unref)
/*****************************************************************************/ /*****************************************************************************/
NM_AUTO_DEFINE_FCN0 (GVariantIter *, _nm_auto_free_variant_iter, g_variant_iter_free) NM_AUTO_DEFINE_FCN0 (GVariantIter *, _nm_auto_free_variant_iter, g_variant_iter_free);
#define nm_auto_free_variant_iter nm_auto(_nm_auto_free_variant_iter) #define nm_auto_free_variant_iter nm_auto(_nm_auto_free_variant_iter)
NM_AUTO_DEFINE_FCN0 (GVariantBuilder *, _nm_auto_unref_variant_builder, g_variant_builder_unref) NM_AUTO_DEFINE_FCN0 (GVariantBuilder *, _nm_auto_unref_variant_builder, g_variant_builder_unref);
#define nm_auto_unref_variant_builder nm_auto(_nm_auto_unref_variant_builder) #define nm_auto_unref_variant_builder nm_auto(_nm_auto_unref_variant_builder)
#define nm_auto_clear_variant_builder nm_auto(g_variant_builder_clear) #define nm_auto_clear_variant_builder nm_auto(g_variant_builder_clear)
NM_AUTO_DEFINE_FCN0 (GList *, _nm_auto_free_list, g_list_free) NM_AUTO_DEFINE_FCN0 (GList *, _nm_auto_free_list, g_list_free);
#define nm_auto_free_list nm_auto(_nm_auto_free_list) #define nm_auto_free_list nm_auto(_nm_auto_free_list)
NM_AUTO_DEFINE_FCN0 (GChecksum *, _nm_auto_checksum_free, g_checksum_free) NM_AUTO_DEFINE_FCN0 (GChecksum *, _nm_auto_checksum_free, g_checksum_free);
#define nm_auto_free_checksum nm_auto(_nm_auto_checksum_free) #define nm_auto_free_checksum nm_auto(_nm_auto_checksum_free)
#define nm_auto_unset_gvalue nm_auto(g_value_unset) #define nm_auto_unset_gvalue nm_auto(g_value_unset)
NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_unref_gtypeclass, g_type_class_unref) NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_unref_gtypeclass, g_type_class_unref);
#define nm_auto_unref_gtypeclass nm_auto(_nm_auto_unref_gtypeclass) #define nm_auto_unref_gtypeclass nm_auto(_nm_auto_unref_gtypeclass)
NM_AUTO_DEFINE_FCN0 (GByteArray *, _nm_auto_unref_bytearray, g_byte_array_unref) NM_AUTO_DEFINE_FCN0 (GByteArray *, _nm_auto_unref_bytearray, g_byte_array_unref);
#define nm_auto_unref_bytearray nm_auto(_nm_auto_unref_bytearray) #define nm_auto_unref_bytearray nm_auto(_nm_auto_unref_bytearray)
static inline void static inline void
@ -194,7 +194,7 @@ NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_unref_gsource, g_source_unref);
NM_AUTO_DEFINE_FCN0 (guint, _nm_auto_remove_source, g_source_remove); NM_AUTO_DEFINE_FCN0 (guint, _nm_auto_remove_source, g_source_remove);
#define nm_auto_remove_source nm_auto(_nm_auto_remove_source) #define nm_auto_remove_source nm_auto(_nm_auto_remove_source)
NM_AUTO_DEFINE_FCN0 (GIOChannel *, _nm_auto_unref_io_channel, g_io_channel_unref) NM_AUTO_DEFINE_FCN0 (GIOChannel *, _nm_auto_unref_io_channel, g_io_channel_unref);
#define nm_auto_unref_io_channel nm_auto(_nm_auto_unref_io_channel) #define nm_auto_unref_io_channel nm_auto(_nm_auto_unref_io_channel)
NM_AUTO_DEFINE_FCN0 (GMainLoop *, _nm_auto_unref_gmainloop, g_main_loop_unref); NM_AUTO_DEFINE_FCN0 (GMainLoop *, _nm_auto_unref_gmainloop, g_main_loop_unref);
@ -1524,7 +1524,7 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro)
/*****************************************************************************/ /*****************************************************************************/
NM_AUTO_DEFINE_FCN_VOID0 (GMutex *, _nm_auto_unlock_g_mutex, g_mutex_unlock) NM_AUTO_DEFINE_FCN_VOID0 (GMutex *, _nm_auto_unlock_g_mutex, g_mutex_unlock);
#define nm_auto_unlock_g_mutex nm_auto (_nm_auto_unlock_g_mutex) #define nm_auto_unlock_g_mutex nm_auto (_nm_auto_unlock_g_mutex)

View file

@ -32,7 +32,7 @@ nm_ref_string_unref (NMRefString *rstr)
_nm_ref_string_unref_non_null (rstr); _nm_ref_string_unref_non_null (rstr);
} }
NM_AUTO_DEFINE_FCN_VOID0 (NMRefString *, _nm_auto_ref_string, _nm_ref_string_unref_non_null) NM_AUTO_DEFINE_FCN_VOID0 (NMRefString *, _nm_auto_ref_string, _nm_ref_string_unref_non_null);
#define nm_auto_ref_string nm_auto(_nm_auto_ref_string) #define nm_auto_ref_string nm_auto(_nm_auto_ref_string)
/*****************************************************************************/ /*****************************************************************************/

View file

@ -20,7 +20,7 @@ char *nm_secret_strchomp (char *secret);
void nm_free_secret (char *secret); void nm_free_secret (char *secret);
NM_AUTO_DEFINE_FCN0 (char *, _nm_auto_free_secret, nm_free_secret) NM_AUTO_DEFINE_FCN0 (char *, _nm_auto_free_secret, nm_free_secret);
/** /**
* nm_auto_free_secret: * nm_auto_free_secret:
* *

View file

@ -1336,7 +1336,7 @@ nm_g_source_destroy_and_unref (GSource *source)
NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_destroy_and_unref_gsource, nm_g_source_destroy_and_unref); NM_AUTO_DEFINE_FCN0 (GSource *, _nm_auto_destroy_and_unref_gsource, nm_g_source_destroy_and_unref);
#define nm_auto_destroy_and_unref_gsource nm_auto(_nm_auto_destroy_and_unref_gsource) #define nm_auto_destroy_and_unref_gsource nm_auto(_nm_auto_destroy_and_unref_gsource)
NM_AUTO_DEFINE_FCN0 (GMainContext *, _nm_auto_pop_gmaincontext, g_main_context_pop_thread_default) NM_AUTO_DEFINE_FCN0 (GMainContext *, _nm_auto_pop_gmaincontext, g_main_context_pop_thread_default);
#define nm_auto_pop_gmaincontext nm_auto (_nm_auto_pop_gmaincontext) #define nm_auto_pop_gmaincontext nm_auto (_nm_auto_pop_gmaincontext)
static inline gboolean static inline gboolean
@ -1379,7 +1379,7 @@ nm_g_source_attach (GSource *source,
return source; return source;
} }
NM_AUTO_DEFINE_FCN0 (GMainContext *, _nm_auto_unref_gmaincontext, g_main_context_unref) NM_AUTO_DEFINE_FCN0 (GMainContext *, _nm_auto_unref_gmaincontext, g_main_context_unref);
#define nm_auto_unref_gmaincontext nm_auto (_nm_auto_unref_gmaincontext) #define nm_auto_unref_gmaincontext nm_auto (_nm_auto_unref_gmaincontext)
static inline GMainContext * static inline GMainContext *

View file

@ -476,27 +476,27 @@ nm_close (int fd)
static inline void name (void *v) \ static inline void name (void *v) \
{ \ { \
func (*((CastType *) v)); \ func (*((CastType *) v)); \
} } _NM_DUMMY_STRUCT_FOR_TRAILING_SEMICOLON
#define NM_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \ #define NM_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \
static inline void name (void *v) \ static inline void name (void *v) \
{ \ { \
if (*((CastType *) v)) \ if (*((CastType *) v)) \
func (*((CastType *) v)); \ func (*((CastType *) v)); \
} } _NM_DUMMY_STRUCT_FOR_TRAILING_SEMICOLON
#define NM_AUTO_DEFINE_FCN(Type, name, func) \ #define NM_AUTO_DEFINE_FCN(Type, name, func) \
static inline void name (Type *v) \ static inline void name (Type *v) \
{ \ { \
func (*v); \ func (*v); \
} } _NM_DUMMY_STRUCT_FOR_TRAILING_SEMICOLON
#define NM_AUTO_DEFINE_FCN0(Type, name, func) \ #define NM_AUTO_DEFINE_FCN0(Type, name, func) \
static inline void name (Type *v) \ static inline void name (Type *v) \
{ \ { \
if (*v) \ if (*v) \
func (*v); \ func (*v); \
} } _NM_DUMMY_STRUCT_FOR_TRAILING_SEMICOLON
/*****************************************************************************/ /*****************************************************************************/
@ -514,7 +514,7 @@ static inline void name (Type *v) \
* However, let's never mix them. To free malloc'ed memory, always use * However, let's never mix them. To free malloc'ed memory, always use
* free() or nm_auto_free. * free() or nm_auto_free.
*/ */
NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_free_impl, free) NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_free_impl, free);
#define nm_auto_free nm_auto(_nm_auto_free_impl) #define nm_auto_free nm_auto(_nm_auto_free_impl)
/*****************************************************************************/ /*****************************************************************************/

View file

@ -92,7 +92,7 @@ static gboolean _connect_sdp_session_start (NMBluez5DunContext *context,
/*****************************************************************************/ /*****************************************************************************/
NM_AUTO_DEFINE_FCN0 (NMBluez5DunContext *, _nm_auto_free_context, _context_free) NM_AUTO_DEFINE_FCN0 (NMBluez5DunContext *, _nm_auto_free_context, _context_free);
#define nm_auto_free_context nm_auto(_nm_auto_free_context) #define nm_auto_free_context nm_auto(_nm_auto_free_context)
/*****************************************************************************/ /*****************************************************************************/

View file

@ -17,7 +17,7 @@ void nmp_rules_manager_ref (NMPRulesManager *self);
void nmp_rules_manager_unref (NMPRulesManager *self); void nmp_rules_manager_unref (NMPRulesManager *self);
#define nm_auto_unref_rules_manager nm_auto (_nmp_rules_manager_unref) #define nm_auto_unref_rules_manager nm_auto (_nmp_rules_manager_unref)
NM_AUTO_DEFINE_FCN0 (NMPRulesManager *, _nmp_rules_manager_unref, nmp_rules_manager_unref) NM_AUTO_DEFINE_FCN0 (NMPRulesManager *, _nmp_rules_manager_unref, nmp_rules_manager_unref);
void nmp_rules_manager_track (NMPRulesManager *self, void nmp_rules_manager_track (NMPRulesManager *self,
const NMPlatformRoutingRule *routing_rule, const NMPlatformRoutingRule *routing_rule,

View file

@ -135,7 +135,7 @@ expected_free (Expected *e)
g_free (e); g_free (e);
} }
NM_AUTO_DEFINE_FCN_VOID0 (Expected *, _nm_auto_free_expected, expected_free) NM_AUTO_DEFINE_FCN_VOID0 (Expected *, _nm_auto_free_expected, expected_free);
#define nm_auto_free_expected nm_auto(_nm_auto_free_expected) #define nm_auto_free_expected nm_auto(_nm_auto_free_expected)
static void static void