Changeset b0430a6 for perlconfig.c


Ignore:
Timestamp:
Dec 21, 2003, 8:19:14 PM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
2de4f20
Parents:
72836b5
Message:
New zephyr_get_field function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    r27c3a93 rb0430a6  
    2626  HV *h;
    2727  SV *hr;
    28   char *ptr, *ptr2, *blessas;
    29   int len, i, j;
     28  char *ptr, *blessas;
     29  int i, j;
    3030
    3131  if (!m) return &PL_sv_undef;
     
    4343    j=owl_zephyr_get_num_fields(owl_message_get_notice(m));
    4444    for (i=0; i<j; i++) {
    45       ptr=owl_zephyr_get_field(owl_message_get_notice(m), i+1, &len);
    46       ptr2=owl_malloc(len+1);
    47       memcpy(ptr2, ptr, len);
    48       ptr2[len]='\0';
    49       av_push(av_zfields, newSVpvn(ptr2, len));
    50       owl_free(ptr2);
     45      ptr=owl_zephyr_get_field(owl_message_get_notice(m), i+1);
     46      av_push(av_zfields, newSVpvn(ptr, strlen(ptr)));
     47      owl_free(ptr);
    5148    }
    5249    hv_store(h, "fields", strlen("fields"), newRV_noinc((SV*)av_zfields), 0);
Note: See TracChangeset for help on using the changeset viewer.