pike.git/
src/
block_alloc.h
Branch:
Tag:
Non-build tags
All tags
No tags
2000-11-25
2000-11-25 16:33:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f87e03fe1ec2659df2b588213a55232b7da245b9 (
11
lines) (+
6
/-
5
)
[
Show
|
Annotate
]
Branch:
7.9
Added some casts.
Rev: src/block_alloc.h:1.25
1:
-
/* $Id: block_alloc.h,v 1.
24
2000/
08
/
24
04
:
04
:
40
hubbe
Exp $ */
+
/* $Id: block_alloc.h,v 1.
25
2000/
11
/
25
16
:
33
:
22
grubba
Exp $ */
#undef PRE_INIT_BLOCK #undef INIT_BLOCK #undef EXIT_BLOCK
43:
\ for(e=0;e<BSIZE;e++) \ { \
-
n->x[e].BLOCK_ALLOC_NEXT=PIKE_CONCAT3(free_,DATA,s);
\
+
n->x[e].BLOCK_ALLOC_NEXT=
(void *)
PIKE_CONCAT3(free_,DATA,s); \
PRE_INIT_BLOCK( (n->x+e) ); \ PIKE_CONCAT3(free_,DATA,s)=n->x+e; \ } \ } \ \ tmp=PIKE_CONCAT3(free_,DATA,s); \
-
PIKE_CONCAT3(free_,DATA,s)=tmp->BLOCK_ALLOC_NEXT;
\
+
PIKE_CONCAT3(free_,DATA,s)=
(struct DATA *)
tmp->BLOCK_ALLOC_NEXT; \
DO_IF_DMALLOC( dmalloc_register(tmp,sizeof(struct DATA), DMALLOC_LOCATION()); )\ INIT_BLOCK(tmp); \ return tmp; \
60:
{ \ EXIT_BLOCK(d); \ DO_IF_DMALLOC( dmalloc_unregister(d, 1); ) \
-
d->BLOCK_ALLOC_NEXT=PIKE_CONCAT3(free_,DATA,s);
\
+
d->BLOCK_ALLOC_NEXT
=
(void *)
PIKE_CONCAT3(free_,DATA,s); \
PRE_INIT_BLOCK(d); \ PIKE_CONCAT3(free_,DATA,s)=d; \ } \
99:
COUNT_BLOCK(tmp); \ } \ for(tmp2=PIKE_CONCAT3(free_,DATA,s);tmp2; \
-
tmp2=tmp2->BLOCK_ALLOC_NEXT) num--;
\
+
tmp2
=
(struct DATA *)
tmp2->BLOCK_ALLOC_NEXT) num--; \
COUNT_OTHER(); \ *num_=num; \ *size_=size; \