/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include<ch.h>

EXPORTCH void functionName_chdl(void *varg) {
  ChInterp_t interp;
  ChVaList_t ap;
  char *s;

  Ch_VaStart(interp, ap, varg);
  s = Ch_VaArg(interp, ap, char*);       /* get arg from Ch space, s is a string_t  */ 

  functionName(s);
  free(s);  /* s cannot be saved and registered  in functionName and used 
            later */
            /* do not use string_t for callback function etc. Without this, 
            memory will be leaked */

  Ch_VaEnd(interp, ap);
}

