comparison libpurple/plugins/perl/common/Request.xs @ 18118:ab6d2763b8d8

Re-fix the DBus list handling code by killing const GList* / const GSList* everywhere. Now we maintain a list of functions which return a GList or GSList which must not be freed. Ideally at some point this will be replaced with code that looks at the Doxygen comment for the function and honors @constreturn, which I've declared as a macro around @return that prints a @note about not modifying or freeing the returned value.
author Richard Laager <rlaager@wiktel.com>
date Sat, 16 Jun 2007 19:44:59 +0000
parents 8e54f40a60f3
children b80d3c8097d4
comparison
equal deleted inserted replaced
18117:cd81f8f36788 18118:ab6d2763b8d8
394 394
395 void 395 void
396 purple_request_field_list_get_items(field) 396 purple_request_field_list_get_items(field)
397 Purple::Request::Field field 397 Purple::Request::Field field
398 PREINIT: 398 PREINIT:
399 const GList *l; 399 GList *l;
400 PPCODE: 400 PPCODE:
401 for (l = purple_request_field_list_get_items(field); l != NULL; l = l->next) { 401 for (l = purple_request_field_list_get_items(field); l != NULL; l = l->next) {
402 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); 402 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
403 } 403 }
404 404
408 408
409 void 409 void
410 purple_request_field_list_get_selected(field) 410 purple_request_field_list_get_selected(field)
411 Purple::Request::Field field 411 Purple::Request::Field field
412 PREINIT: 412 PREINIT:
413 const GList *l; 413 GList *l;
414 PPCODE: 414 PPCODE:
415 for (l = purple_request_field_list_get_selected(field); l != NULL; l = l->next) { 415 for (l = purple_request_field_list_get_selected(field); l != NULL; l = l->next) {
416 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); 416 XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
417 } 417 }
418 418
623 623
624 void 624 void
625 purple_request_fields_get_required(fields) 625 purple_request_fields_get_required(fields)
626 Purple::Request::Fields fields 626 Purple::Request::Fields fields
627 PREINIT: 627 PREINIT:
628 const GList *l; 628 GList *l;
629 PPCODE: 629 PPCODE:
630 for (l = purple_request_fields_get_required(fields); l != NULL; l = l->next) { 630 for (l = purple_request_fields_get_required(fields); l != NULL; l = l->next) {
631 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Request::Field"))); 631 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Request::Field")));
632 } 632 }
633 633