Changeset 712caac for perlconfig.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:17 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
c529ac8
Parents:
defe4a3
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:00:22)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:17)
Message:
Cast away const on strings passed to libzephyr (with new function zstr).

libzephyr doesn’t use const anywhere, so we’re going to need to cast
const char * to char * all the time when passing strings to it.  We
wrap this cast in a new inline function for better type safety.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rf12d199 r712caac  
    179179    n->z_auth = ZAUTH_NO;
    180180    n->z_checked_auth = 0;
    181     n->z_class = owl_message_get_class(m);
    182     n->z_class_inst = owl_message_get_instance(m);
    183     n->z_opcode = owl_message_get_opcode(m);
    184     n->z_sender = owl_message_get_sender(m);
    185     n->z_recipient = owl_message_get_recipient(m);
    186     n->z_default_format = "[zephyr created from perl]";
    187     n->z_multinotice = "[zephyr created from perl]";
     181    n->z_class = zstr(owl_message_get_class(m));
     182    n->z_class_inst = zstr(owl_message_get_instance(m));
     183    n->z_opcode = zstr(owl_message_get_opcode(m));
     184    n->z_sender = zstr(owl_message_get_sender(m));
     185    n->z_recipient = zstr(owl_message_get_recipient(m));
     186    n->z_default_format = zstr("[zephyr created from perl]");
     187    n->z_multinotice = zstr("[zephyr created from perl]");
    188188    n->z_num_other_fields = 0;
    189189    n->z_message = owl_sprintf("%s%c%s", owl_message_get_zsig(m), '\0', owl_message_get_body(m));
Note: See TracChangeset for help on using the changeset viewer.