Technology
 

Obstack grow

出典: GCC Wikia

目次

[編集] このページを編集する際は,編集に関する方針に従ってください.

[編集] 概要

[編集] 引数

[編集] 実装

 obstack.h
295: #if defined __GNUC__ && defined __STDC__ && __STDC__
~
331: # define obstack_grow(OBSTACK,where,length)                             \
332: __extension__                                                           \
333: ({ struct obstack *__o = (OBSTACK);                                     \
334:    int __len = (length);                                                \
335:    if (__o->next_free + __len > __o->chunk_limit)                       \
336:      _obstack_newchunk (__o, __len);                                    \
337:    _obstack_memcpy (__o->next_free, (where), __len);                    \
338:    __o->next_free += __len;                                             \
339:    (void) 0; })
~
445: #else /* not __GNUC__ or not __STDC__ */
~
467: # define obstack_grow(h,where,length)                                   \
468: ( (h)->temp = (length),                                                 \
469:   (((h)->next_free + (h)->temp > (h)->chunk_limit)                      \
470:    ? (_obstack_newchunk ((h), (h)->temp), 0) : 0),                      \
471:   _obstack_memcpy ((h)->next_free, (where), (h)->temp),                 \
472:   (h)->next_free += (h)->temp)
~
539: #endif /* not __GNUC__ or not __STDC__ */

~
***-
~
 obstack.c
458: void (obstack_grow) (struct obstack *obstack, POINTER pointer, int length)
459: {
460:   obstack_grow (obstack, pointer, length);
461: }


リンク元