develooper Front page | perl.perl5.porters | Postings from May 2016

Adding stuff to mathoms.c is now simplified, generalized

Thread Next
From:
Karl Williamson
Date:
May 13, 2016 04:34
Subject:
Adding stuff to mathoms.c is now simplified, generalized
Message ID:
57355962.3010303@khwilliamson.com
With commit 5f81fa4069cb15ccd77b1c4253c870df84c1788a, moving something 
to mathoms.c is now simplified.  Previously no C function prototype was 
generated, so you had to add one yourself at the beginning of the file. 
  Some things required the parameter asserts to also be added 
individually, and some functions required special handling in 
makedef.pl.  All of that is gone.

To move a function to mathoms.c, simply cut and paste it to there, and 
change its embed.fnc entry to additionally have the 'b' flag.  If, for 
some reason a function you'd like to be treated as mathoms can't be 
moved from its current place, simply enclose it between

    #ifndef NO_MATHOMS
    ...
    #endif

and add the 'b' flag in embed.fnc.

If you don't know what mathoms is,

/*
  *  Anything that Hobbits had no immediate use for, but were unwilling to
  *  throw away, they called a mathom.  Their dwellings were apt to become
  *  rather crowded with mathoms, and many of the presents that passed from
  *  hand to hand were of that sort.
  *
  *     [p.5 of _The Lord of the Rings_: "Prologue"]
  */

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About