Branch: Tag:

2012-06-10

2012-06-10 00:33:57 by Martin Stjernholm <mast@lysator.liu.se>

Handle null objects correctly in emulate_bindings.

Note that fixing this opens up a bug compat issue, described in
comment #7 in [bug 5900 (#5900)].

49:    lambda(mixed m) {    if(zero_type(m))    return "NULL"; +  if (objectp (m) && m->is_val_null) +  // Note: Could need bug compatibility here - in some cases +  // we might be passed a null object that can be cast to +  // "", and before this it would be. This is an observed +  // compat issue in comment #7 in [bug 5900]. +  return "NULL";    if(multisetp(m))    return sizeof(m) ? indices(m)[0] : "";    return "'"+(intp(m)?(string)m:my_quote((string)m))+"'";