pike.git/
src/
modules/
_Debug/
debug.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2017-11-20
2017-11-20 23:48:05 by Stephen R. van den Berg <srb@cuci.nl>
f9561d3b1611ad43bc5f683f864f3c37b3c33646 (
9
lines) (+
9
/-
0
)
[
Show
|
Annotate
]
Branch:
8.1
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 */