Branch: Tag:

2017-11-20

2017-11-20 23:48:05 by Stephen R. van den Berg <srb@cuci.nl>

Debug.refs: Protect against non-refcounted parameters.

72:    */   PIKEFUN int refs(string|array|mapping|multiset|function|object|program o)   { +  if(!REFCOUNTED_TYPE(TYPEOF(*o))) +  SIMPLE_ARG_TYPE_ERROR("refs", 1, +  "array|mapping|multiset|object|" +  "function|program|string|type");    RETURN o->u.refs[0];   }   
499:    */   PIKEFUN void dump_dmalloc_locations(string|array|mapping|multiset|function|object|program|type o)   { +  if(!REFCOUNTED_TYPE(TYPEOF(*o))) +  SIMPLE_ARG_TYPE_ERROR("refs", 1, +  "array|mapping|multiset|object|" +  "function|program|string|type");    debug_malloc_dump_references (o->u.refs, 2, 1, 0);   }   #endif /* DEBUG_MALLOC */