- Timestamp:
- 03/13/09 14:32:45 (16 years ago)
- Location:
- lang/gauche/mecab-gauche-0.98pre1
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/gauche/mecab-gauche-0.98pre1/mecab.c
r84 r85 12 12 #include "mecab.h" 13 13 14 //ScmClass *Scm_MeCabClass;15 14 // mecab_t 16 15 mecab_t* unwrap_mecab_t(ScmObj obj) … … 94 93 95 94 /* 96 static void MeCab_print(ScmObj obj, ScmPort *out, ScmWriteContext *ctx)97 {98 ScmMeCab *m = SCM_MECAB(obj);//SCM_MECAB_UNBOX(obj);99 // const char *queue_name = q->getName().c_str();100 Scm_Printf(out, "#<<mecab> 0x%x>", m->m);101 }102 103 static void MeCab_cleanup(ScmObj obj)104 {105 ScmMeCab *m = SCM_MECAB(obj);106 if (m->m) {107 mecab_destroy(m->m);108 m->m = NULL;109 }110 }111 */112 113 /*114 95 * Module initialization function. 115 96 */ … … 125 106 /* Create the module if it doesn't exist yet. */ 126 107 mod = SCM_MODULE(SCM_FIND_MODULE("mecab", TRUE)); 127 /* 128 Scm_MeCabClass = 129 Scm_MakeForeignPointerClass(mod, "<mecab>", 130 MeCab_print, 131 MeCab_cleanup, 132 SCM_FOREIGN_POINTER_KEEP_IDENTITY|SCM_FOREIGN_POINTER_MAP_NULL); 133 */ 108 134 109 /* Register stub-generated procedures */ 135 110 Scm_Init_mecablib(mod); -
lang/gauche/mecab-gauche-0.98pre1/mecablib.stub
r84 r85 21 21 (define-type <mecab-t> "mecab_t*" "mecab_t" 22 22 "SCM_MECABP" "unwrap_mecab_t" "wrap_mecab_t") 23 ;(define-type <mecab_node_t> "mecab_node_t*" "mecab_node_t"24 ; "SCM_MECABP" "unwrap_mecab_node_t" "wrap_mecab_node_t")25 23 (define-type <const-mecab-node-t> "const mecab_node_t*" "const mecab_node_t" 26 24 "SCM_MECAB_NODEP" "unwrap_mecab_node_t" "wrap_mecab_node_t")