Changeset 1373

Show
Ignore:
Timestamp:
08/10/08 10:10:33 (5 months ago)
Author:
jtv
Message:

Fixed broken is_null for C-style strings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/pqxx/util.hxx

    r1362 r1373  
    157157  static const char *name() { return "const char *"; } 
    158158  static bool has_null() { return true; } 
    159   static bool is_null(const char *t) { return t != NULL; } 
     159  static bool is_null(const char *t) { return !t; } 
    160160  static const char *null() { return NULL; } 
    161161  static void from_string(const char Str[], const char *&Obj) { Obj = Str; } 
     
    168168  static const char *name() { return "char[]"; } 
    169169  static bool has_null() { return true; } 
    170   static bool is_null(const char t[]) { return t != NULL; } 
     170  static bool is_null(const char t[]) { return !t; } 
    171171  static const char *null() { return NULL; } 
    172172  static void from_string(const char Str[], const char *&Obj) { Obj = Str; }