Update of bug #44464 (project make):

              Item Group:                     Bug => Enhancement            

    _______________________________________________________

Follow-up Comment #3:

Technically, you are not supposed to hand any pointer to memory to GNU make
which is not allocated with gmk_alloc(); the docs say:

Thus you should never pass memory that you’ve allocated directly to any make
function, nor should you attempt to directly free any memory returned to you
by any make function. Instead, use the gmk_alloc and gmk_free functions.

This is intended to apply to the function name as well, so you're supposed to
use gmk_alloc() to duplicate the string containing the function name (maybe
writing a utility function like blah_strdup() or something) and pass that to
gmk_add_function().

That could be made clearer in the documentation.  Also this rule could be
relaxed, and as you suggest GNU make could duplicate the function name itself,
for safety.  I'll leave this as an enhancement request.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44464>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


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

Reply via email to