pike.git/
src/
svalue.h
Branch:
Tag:
Non-build tags
All tags
No tags
1998-04-08
1998-04-08 02:47:28 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
98af0d58ad89b164eba4a1991a472f58f411b192 (
6
lines) (+
4
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
fixed to handle short unions
Rev: src/svalue.c:1.25
Rev: src/svalue.h:1.15
5:
\*/ /*
-
* $Id: svalue.h,v 1.
14
1998/
03
/
28
15
:
07
:
20
grubba
Exp $
+
* $Id: svalue.h,v 1.
15
1998/
04
/
08
02
:
47
:
28
hubbe
Exp $
*/ #ifndef SVALUE_H #define SVALUE_H
189:
#endif #define free_svalue(X) do { struct svalue *_s=(X); check_type(_s->type); check_refs(_s); if(_s->type<=MAX_REF_TYPE) { debug_malloc_touch(_s->u.refs); if(--*(_s->u.refs) <=0) really_free_svalue(_s); } }while(0)
+
#define free_short_svalue(X,T) do { union anything *_s=(X); TYPE_T _t=(T); check_type(_t); check_refs2(_s,_t); if(_t<=MAX_REF_TYPE && _s->refs) if(--*(_s->refs) <= 0) really_free_short_svalue(_s,_t); }while(0)
#define assign_svalue_no_free(X,Y) do { struct svalue _tmp, *_to=(X), *_from=(Y); check_type(_from->type); check_refs(_from); *_to=_tmp=*_from; if(_tmp.type <= MAX_REF_TYPE) { debug_malloc_touch(_tmp.u.refs); _tmp.u.refs[0]++; } }while(0) #define assign_svalue(X,Y) do { struct svalue *_to2=(X), *_from2=(Y); free_svalue(_to2); assign_svalue_no_free(_to2, _from2); }while(0) extern struct svalue dest_ob_zero; /* Prototypes begin here */
-
void free_short_svalue(union anything *s,TYPE_T type);
+
void
really_
free_short_svalue(union anything *s,
TYPE_T type);
void really_free_svalue(struct svalue *s); void free_svalues(struct svalue *s,INT32 num, INT32 type_hint); void assign_svalues_no_free(struct svalue *to,