2000-06-16
2000-06-16 23:18:40 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
433d5d8c7d5b662ffcb48862adb2acf9e86114ac
(25 lines)
(+15/-10)
[
Show
| Annotate
]
Branch: 7.9
oops..
Rev: src/svalue.h:1.56
5:
\*/
/*
- * $Id: svalue.h,v 1.55 2000/06/16 22:06:46 hubbe Exp $
+ * $Id: svalue.h,v 1.56 2000/06/16 23:18:40 hubbe Exp $
*/
#ifndef SVALUE_H
#define SVALUE_H
256:
extern void describe(void *); /* defined in gc.c */
#define check_type(T) if(T > MAX_TYPE && T!=T_LVALUE && T!=T_SHORT_LVALUE && T!=T_VOID && T!=T_DELETED && T!=T_ARRAY_LVALUE) fatal("Type error: %d\n",T)
- #define check_svalue(S) debug_check_svalue(dmalloc_check_svalue(S,DMALLOC_LOCATION))
+ #define check_svalue(S) debug_check_svalue(dmalloc_check_svalue(S,DMALLOC_LOCATION()))
#define check_refs(S) do {\
if((S)->type <= MAX_REF_TYPE && (!(S)->u.refs || (S)->u.refs[0] < 0)) { \
274: Inside #if defined(DEBUG_MALLOC)
static inline struct svalue *dmalloc_check_svalue(struct svalue *s, char *l)
{
debug_malloc_update_location(s,l);
+ #if 0
if(s->type <= MAX_REF_TYPE)
debug_malloc_update_location(s->u.refs,l);
-
+ #endif
return s;
}
- static inline union anything *dmalloc_check_union(union anything *u, char * l)
+ static inline union anything *dmalloc_check_union(union anything *u,int type, char * l)
{
debug_malloc_update_location(u,l);
-
+ #if 0
if(type <= MAX_REF_TYPE)
debug_malloc_update_location(u->refs,l);
-
+ #endif
return u;
}
386:
INT32 pike_sizeof(struct svalue *s);
/* Prototypes end here */
- #define gc_xmark_svalues(S,N) real_gc_xmark_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION),N)
- #define gc_check_svalues(S,N) real_gc_check_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION),N)
- #define gc_check_short_svalue(U,T) real_gc_check_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION),T)
- #define gc_mark_svalues(S,N) real_gc_mark_svalues(dmalloc_check_svalue((S),DMALLOC_LOCATION),N)
- #define gc_mark_short_svalue(U,T) real_gc_mark_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION),T)
- #define gc_cycle_check_svalues(S,N) real_gc_cycle_check_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION),N)
- #define gc_cycle_check_short_svalue(U,T) real_gc_cycle_check_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION),(T))
+ #define gc_xmark_svalues(S,N) real_gc_xmark_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION()),N)
+ #define gc_check_svalues(S,N) real_gc_check_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION()),N)
+ #define gc_check_short_svalue(U,T) real_gc_check_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION()),T)
+ #define gc_mark_svalues(S,N) real_gc_mark_svalues(dmalloc_check_svalue((S),DMALLOC_LOCATION()),N)
+ #define gc_mark_short_svalue(U,T) real_gc_mark_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION()),T)
+ #define gc_cycle_check_svalues(S,N) real_gc_cycle_check_svalues(dmalloc_check_svalue(S,DMALLOC_LOCATION()),N)
+ #define gc_cycle_check_short_svalue(U,T) real_gc_cycle_check_short_svalue(dmalloc_check_union((U),(T),DMALLOC_LOCATION()),(T))
#ifndef NO_PIKE_SHORTHAND