diff options
author | Lucas De Marchi <lucas.de.marchi@gmail.com> | 2013-05-01 02:27:56 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-05-01 09:04:21 +0300 |
commit | c1e4e183b5e8590651064655a38298966a71ca74 (patch) | |
tree | 7c0ca28bb93e830b99596240f8587220d3f86b12 /gobex | |
parent | 45abbe7b9a51f3ccd085a3025c72ce3e9b5b9f86 (diff) | |
download | bluez-c1e4e183b5e8590651064655a38298966a71ca74.tar.gz |
gobex: Get rid of gint
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
Diffstat (limited to 'gobex')
-rw-r--r-- | gobex/gobex.c | 14 | ||||
-rw-r--r-- | gobex/gobex.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gobex/gobex.c b/gobex/gobex.c index ce4f284cf..9be5d3948 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -55,7 +55,7 @@ struct srm_config { }; struct _GObex { - gint ref_count; + int ref_count; GIOChannel *io; guint io_source; @@ -623,7 +623,7 @@ static void prepare_srm_req(GObex *obex, GObexPacket *pkt) g_obex_packet_prepend_header(pkt, hdr); } -guint g_obex_send_req(GObex *obex, GObexPacket *req, gint timeout, +guint g_obex_send_req(GObex *obex, GObexPacket *req, int timeout, GObexResponseFunc func, gpointer user_data, GError **err) { @@ -677,7 +677,7 @@ create_pending: return p->id; } -static gint pending_pkt_cmp(gconstpointer a, gconstpointer b) +static int pending_pkt_cmp(gconstpointer a, gconstpointer b) { const struct pending_pkt *p = a; guint id = GPOINTER_TO_UINT(b); @@ -782,20 +782,20 @@ void g_obex_set_disconnect_function(GObex *obex, GObexFunc func, obex->disconn_func_data = user_data; } -static gint req_handler_cmpop(gconstpointer a, gconstpointer b) +static int req_handler_cmpop(gconstpointer a, gconstpointer b) { const struct req_handler *handler = a; guint opcode = GPOINTER_TO_UINT(b); - return (gint) handler->opcode - (gint) opcode; + return (int) handler->opcode - (int) opcode; } -static gint req_handler_cmpid(gconstpointer a, gconstpointer b) +static int req_handler_cmpid(gconstpointer a, gconstpointer b) { const struct req_handler *handler = a; guint id = GPOINTER_TO_UINT(b); - return (gint) handler->id - (gint) id; + return (int) handler->id - (int) id; } guint g_obex_add_request_function(GObex *obex, guint8 opcode, diff --git a/gobex/gobex.h b/gobex/gobex.h index c42c42c49..3ac7b133f 100644 --- a/gobex/gobex.h +++ b/gobex/gobex.h @@ -44,7 +44,7 @@ typedef void (*GObexResponseFunc) (GObex *obex, GError *err, GObexPacket *rsp, gboolean g_obex_send(GObex *obex, GObexPacket *pkt, GError **err); -guint g_obex_send_req(GObex *obex, GObexPacket *req, gint timeout, +guint g_obex_send_req(GObex *obex, GObexPacket *req, int timeout, GObexResponseFunc func, gpointer user_data, GError **err); gboolean g_obex_cancel_req(GObex *obex, guint req_id, |