Changeset 712caac for owl.h


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
  • owl.h

    r41c9a96 r712caac  
    193193
    194194#define LINE 2048
     195
     196#ifdef HAVE_LIBZEPHYR
     197/* libzephyr doesn't use const, so we appease the type system with this cast. */
     198static inline char *zstr(const char *str)
     199{
     200  return (char *)str;
     201}
     202#endif
    195203
    196204typedef struct _owl_variable {
Note: See TracChangeset for help on using the changeset viewer.