//genMethods "-g" "-t" "char" "-d" "basic" "-y" "display_char" "-w" "free_char" 
#include <stk.h>
#include <LINK/stkWrapper/LINK_STk.h>
#include <LINK/stkWrapper/Wrapper.h>
#include <LINK/stkWrapper/Register.h>
void display_char(SCM, SCM, int);
void free_char(SCM);
typedef char _char;
#define _charDATA(x) ((char*) (EXTDATA(x)))
#define _charIS_DATA(x) (TYPEP(x, tc_CXXwrapper) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<char >::type))
#define _charISNT_DATA(x) (!IS_DATA(x))
#define _charCXX_DATA(x) (*(char*) (EXTDATA(VAL(x))))
#define _charCXX_IS_DATA(x) (INSTANCEP(x) && \
		TYPEP(STk_slot_ref(x,val_scm), tc_CXXwrapper) && \
		(EXTID(STk_slot_ref(x,val_scm)) == Wrapper<char >::type))
#define _charCXX_ISNT_DATA(x) (!CXX_IS_DATA(x))
#include<strstream.h>
void free_char(SCM p)
{
        if (!EXTSTATICP(p))
                Register<char>::deleteEntry(_charDATA(p));
}
void display_char(SCM c, SCM port, int mode)
{
        ostrstream oss;
        if (_charDATA(c))
        	oss << *_charDATA(c);
        oss << ends;
        char *buffer = oss.str();
        Puts(buffer, (port));
        delete buffer;
}
// define your new methods above 
// and register them using STk_add_new_cpp_primitive() below
void genExtra_charMethods() {}
