Mercurial > pidgin
comparison src/protocols/yahoo/yahoo_packet.c @ 13276:d6a799421657
[gaim-migrate @ 15642]
gsize != size_t on weird platforms
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 13 Feb 2006 18:14:14 +0000 |
parents | 4f8c85836b41 |
children | 6c3c8d0d389f |
comparison
equal
deleted
inserted
replaced
13275:4f8c85836b41 | 13276:d6a799421657 |
---|---|
80 } | 80 } |
81 } | 81 } |
82 va_end(ap); | 82 va_end(ap); |
83 } | 83 } |
84 | 84 |
85 gsize yahoo_packet_length(struct yahoo_packet *pkt) | 85 size_t yahoo_packet_length(struct yahoo_packet *pkt) |
86 { | 86 { |
87 GSList *l; | 87 GSList *l; |
88 | 88 |
89 gsize len = 0; | 89 size_t len = 0; |
90 | 90 |
91 l = pkt->hash; | 91 l = pkt->hash; |
92 while (l) { | 92 while (l) { |
93 struct yahoo_pair *pair = l->data; | 93 struct yahoo_pair *pair = l->data; |
94 int tmp = pair->key; | 94 int tmp = pair->key; |
268 | 268 |
269 gaim_circ_buffer_mark_read(yd->txbuf, ret); | 269 gaim_circ_buffer_mark_read(yd->txbuf, ret); |
270 } | 270 } |
271 | 271 |
272 | 272 |
273 gsize yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, | 273 size_t yahoo_packet_build(struct yahoo_packet *pkt, int pad, gboolean wm, |
274 guchar **buf) | 274 guchar **buf) |
275 { | 275 { |
276 gsize pktlen = yahoo_packet_length(pkt); | 276 size_t pktlen = yahoo_packet_length(pkt); |
277 gsize len = YAHOO_PACKET_HDRLEN + pktlen; | 277 size_t len = YAHOO_PACKET_HDRLEN + pktlen; |
278 guchar *data; | 278 guchar *data; |
279 int pos = 0; | 279 int pos = 0; |
280 | 280 |
281 data = g_malloc0(len + 1); | 281 data = g_malloc0(len + 1); |
282 | 282 |
299 return len; | 299 return len; |
300 } | 300 } |
301 | 301 |
302 int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd) | 302 int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd) |
303 { | 303 { |
304 gsize len; | 304 size_t len; |
305 int ret; | 305 int ret; |
306 guchar *data; | 306 guchar *data; |
307 | 307 |
308 if (yd->fd < 0) | 308 if (yd->fd < 0) |
309 return -1; | 309 return -1; |