GNU Info

Info Node: (g-wrap.info)Other functions needed for describing the library glue code

(g-wrap.info)Other functions needed for describing the library glue code


Next: Example of a library description Prev: Defining a new constant Up: Functions for describing C code to import to the interpreter
Enter node , (file) or (file)node

Other functions needed for describing the library glue code
===========================================================

 - Function: gwrap-open-module fname [options ...]
     *For Guile*
     Opens a text file with name FNAME.c, and a Guile initialization
     function       void init_FNAME(void).     FNAME must be a string.
       Also generates a text file with name FNAME.h which contains
     declarations of functions and variables which may be needed by
     other    code, and a file FNAME.html which contains documentation
     about    the exported functions, types, and constants.

     If `(c++? #t)' is passed as an option, a `C++' file    (FNAME.cc)
     is generated instead of a C file (FNAME.c).

     If `(guile-module LST)' is passed as an option, then    g-wrap
     generates code for a (dynamically linkable) module, where the
     module-path is LST.  If this option is #f, no module is
     generated.

     If `(guile-prefix NAME)' is passed as an option NAME indicates a
     prefix that will be appended to the guile-side names.  This may be
     useful if you don't want to create a module.

     If `(call-on-init FN-NAME)' is passed as an option    (FN-NAME
     should be the name of a function of type    `void FN-NAME(void)'),
       FN-NAME is called when the Scheme interpreter initializes the
     library wrapper.

     *For RScheme*
     Creates code for generating an RScheme module named `fname'.
     This includes a file FNAME.scm of glue-code, and an RScheme
     module control file FNAME.mcf which tells the RScheme module
     compiler how to build/compile the module.

     Option `(c-files ("FILE1.C" ...))' puts code in the module
     control file which tells the RScheme module compiler to compile the
       specified C files into the module.

     Option `(h-files ("FILE1.H" ...))' puts code in the module
     control file which tells the RScheme module compiler to use the
     header    files when compiling code into the module.

     Option `(rs-scm-files ("FILE1" ...))' puts code in the    module
     control file which tells the RScheme module compiler to    compile
     compile the specified Scheme files into the module.

     Option `(rs-mods ("MOD1" ...))' indicates that the module    will
     use types, functions, or constants from the specified RScheme
     modules.

     For example,
           (gwrap-open-module "cmat"
                              ; name of Guile module
                              '(guile-module (math matrix cmat))
                              ; extra C files to compile into RS module
                              '(c-files ("cmat_gw_fns.c"))
                              ; extra RScheme modules to include
                              '(rs-mods ("mathlib"))
                              ; extra Scheme files to compile into RS mod
                              '(rs-scm-files ("matrix.scm")))


 - Function: gwrap-include-local-header x
     The C version of the glue code needs to include local header file
      "X".

 - Function: gwrap-include-global-header x
     The C version of the glue code needs to include global header file
       "X".

 - Function: gwrap-generate-wrapped-header x
     Generate a C header file for all of the wrapped functions and
     store it in the file named "X".  This can be useful if you want
     the g-wrap file to be the ultmate authority about the API.  G-wrap
     will include documentation in the header file derived from the
     `new-function' documentation strings.

 - Function: gwrap-assume-types-wrapped lst [options ...]
     Assume that types have been defined in another G-wrap file, so
     that they may be used as parameters in the current G-wrap file.
     LST is a list of pairs of the form (SCHEME-SYM    C-NAME) where
     SCHEME-SYM is a symbol for the type which    will be used to for
     defining parameter types in calls to 'new-function', and    C-NAME
     is a string indicating the name of the object type in C.


 - Function: gwrap-close-module
     Specify end of module description, causing the glue-code and
     related  files to be generated.


automatically generated by info2www version 1.2.2.9