> Date: Sat, 05 Oct 2013 16:34:11 +0300
> From: Eli Zaretskii <e...@gnu.org>
> Cc: bug-make@gnu.org
> 
> Paul, if this limitation is deliberate, I suggest to document it where
> we explain the arguments of gmk_add_function.

One other important thing that doesn't seem to be covered in the
manual is the requirements from the function that implements the
Make function added by a loaded object.  If the reader looks at
gnumake.h, she will see that the function's signature should be like
this:

  char *(*func)(const char *nm, int argc, char **argv)

But this had better be documented explicitly in the manual.

More importantly, we never say that the 'char *' value returned by the
extending function must either be a pointer to a buffer allocated by
calling gmk_alloc, or NULL; any other kind of pointer will cause
unexpected results or crashes, because Make will try to free any
non-NULL pointer returned by the extension.  I think it is quite
important to describe this in the manual.

(I can make these changes in documentation, if you agree.)

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to