Eric Blake <[EMAIL PROTECTED]> writes:

> Is the name okay?  Is it worth adding to gnulib?

Ideally I suppose it'd be added to glibc as well.  This means patching
the documentation, adding implementations for non-GCC compilers, etc.
The name is fine with me.

The style should use the same style as the current obstack.h;
see its obstack_grow macro.

>    void *__end = (void *)((PTR_INT_TYPE)(OBJ) + (SIZE));              \

This does not look right to me.  PTR_INT_TYPE is not necessarily wide
enough to hold a pointer.  Look for "AS/400" in obstack.h.

>  if (__obj > (void *)__o->chunk && __end < (void *)__o->chunk_limit)  \
>    {                                                                  \
>      __o->next_free = (char *)__end;                                  \
>      __o->object_base = (char *)__obj;                                \
>    }                                                                  \
>  else                                                                 \
>    {                                                                  \
>      (obstack_free) (__o, __end);                                     \
>      __o->object_base = (char *)__obj;                                \
>    }                                                                  \

How about this instead?  It's a bit simpler.

   obstack_free (__o, __end);
   __o->object_base = (char *)__obj;


_______________________________________________
Bug-m4 mailing list
Bug-m4@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-m4

Reply via email to