Changeset 2176 for libswish3/trunk/src/libswish3/tokenizer.c
- Timestamp:
- 09/22/08 22:57:38 (4 months ago)
- Files:
-
- libswish3/trunk/src/libswish3/tokenizer.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libswish3/trunk/src/libswish3/tokenizer.c
r2175 r2176 454 454 455 455 if (SWISH_DEBUG & SWISH_DEBUG_MEMORY) { 456 SWISH_DEBUG_MSG("freeing Token %dwith MetaName ref_cnt %d",457 t, t->meta->ref_cnt);456 SWISH_DEBUG_MSG("freeing Token 0x%x with MetaName ref_cnt %d", 457 (long int)t, t->meta->ref_cnt); 458 458 } 459 459 … … 502 502 swish_TokenIterator * 503 503 swish_init_token_iterator( 504 swish_ 3 *s3504 swish_Analyzer *a 505 505 ) 506 506 { 507 507 swish_TokenIterator *it; 508 508 it = swish_xmalloc(sizeof(swish_TokenIterator)); 509 it-> s3 = s3;510 it-> s3->ref_cnt++;509 it->a = a; 510 it->a->ref_cnt++; 511 511 it->pos = 0; 512 512 it->tl = swish_init_token_list(); … … 527 527 if (SWISH_DEBUG & SWISH_DEBUG_MEMORY) { 528 528 SWISH_DEBUG_MSG( 529 "freeing TokenIterator %d with TokenList ref_cnt %d and s3 ref_cnt %d", 530 it, it->tl->ref_cnt, it->s3->ref_cnt); 531 } 532 533 it->s3->ref_cnt--; 529 "freeing TokenIterator %d with TokenList ref_cnt %d and Analyzer ref_cnt %d", 530 it, it->tl->ref_cnt, it->a->ref_cnt); 531 } 532 533 it->a->ref_cnt--; 534 if (SWISH_DEBUG & SWISH_DEBUG_MEMORY) { 535 SWISH_DEBUG_MSG("freeing TokenIterator with Analyzer ref_cnt = %d", 536 it->a->ref_cnt); 537 } 538 if (it->a->ref_cnt == 0) 539 swish_free_analyzer(it->a); 534 540 535 541 it->tl->ref_cnt--; … … 589 595 590 596 tl = ti->tl; 591 maxwordlen = ti-> s3->analyzer->maxwordlen;592 minwordlen = ti-> s3->analyzer->minwordlen;597 maxwordlen = ti->a->maxwordlen; 598 minwordlen = ti->a->minwordlen; 593 599 token = swish_xmalloc(sizeof(xmlChar) * maxwordlen); 594 600 buf_lower = swish_utf8_str_tolower(buf); … … 796 802 797 803 tl = ti->tl; 798 maxwordlen = ti-> s3->analyzer->maxwordlen;799 minwordlen = ti-> s3->analyzer->minwordlen;804 maxwordlen = ti->a->maxwordlen; 805 minwordlen = ti->a->minwordlen; 800 806 token = swish_xmalloc(sizeof(xmlChar) * maxwordlen); 801 807 nstart = tl->n;
