logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

libmawk_call_function - call an user defined (script) function

Description

       The libmawk_call_function() function looks up an user defined awk function called fname , fills the stack
       with arguments converted from the varargs and calls the function.  The libmawk_call_functionp()  performs
       the  same  action  but  avoids  using  vararg  by  requiring an array of generic pointers to the function
       arguments.

       Argtype is a zero terminated string for both functions, each character corresponding to an argument. Type
       characters are described in libmawk_set_cell() manual page.

       If res is non-NULL, it is cell_destroyed (regardless of errors) and the return value of the user function
       is copied into it. The caller shall run libmawk_cell_destroy on it.

       Argument   m   is   a    libmawk    context    previously    returned    by    libmawk_initialize()    or
       libmawk_initialize_stage3().

Name

       libmawk_call_function - call an user defined (script) function

Return Value

       A  pointer  to  the  cell  returned  by  the  user  function.  The  cell returnedmust be destroyed by the
       application using libmawk_cell_destroy.

See Also

libmawk_initialize_stage(3libmawk),     libmawk_initialize(3libmawk),     libmawk_cell_destroy(3libmawk),
       libmawk_set_cell(3libmawk),

libmawk                                            2009-08-10                    LIBMAWK_CALL_FUNCTION(3libmawk)

Synopsis

#include<libmawk.h>intlibmawk_call_function(mawk_state_t*MAWK,constchar*fname,CELL*res,constchar*argtpes,...);intlibmawk_call_functionp(mawk_state_t*MAWK,constchar*fname,CELL*res,constchar*argtpes,void**args);

See Also