(linenum→info "unix/slp.c:2238")

gauche/0.8.12/ext/template.extension.c

    1: /*
    2:  * @@extname@@.c
    3:  */
    4: 
    5: #include "@@extname@@.h"
    6: 
    7: /*
    8:  * The following function is a dummy one; replace it for
    9:  * your C function definitions.
   10:  */
   11: 
   12: ScmObj test_@@extname@@(void)
   13: {
   14:     return SCM_MAKE_STR("@@extname@@ is working");
   15: }
   16: 
   17: /*
   18:  * Module initialization function.
   19:  */
   20: extern void Scm_Init_@@extname@@lib(ScmModule*);
   21: 
   22: void Scm_Init_@@extname@@(void)
   23: {
   24:     ScmModule *mod;
   25: 
   26:     /* Register this DSO to Gauche */
   27:     SCM_INIT_EXTENSION(@@extname@@);
   28: 
   29:     /* Create the module if it doesn't exist yet. */
   30:     mod = SCM_MODULE(SCM_FIND_MODULE("@@modname@@", TRUE));
   31: 
   32:     /* Register stub-generated procedures */
   33:     Scm_Init_@@extname@@lib(mod);
   34: }
Syntax (Markdown)