Show
Ignore:
Timestamp:
07/21/08 23:51:24 (4 months ago)
Author:
karpet
Message:

change top-level tokenizer functions to use same signature so that we can more easily
swap between them. Change tests to use new iterator style by default (-t option to swish_lint).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libswish3/trunk/src/swish_words.c

    r2104 r2148  
    110110 
    111111    for (; i < argc; i++) { 
    112         list = swish_tokenize(s3->analyzer, (xmlChar *)argv[i], 0, 0, meta, meta); 
     112        list = swish_init_wordlist(); 
     113        list->ref_cnt++; 
     114        swish_tokenize(s3, (xmlChar *)argv[i], list, 0, 0, meta, meta); 
    113115        printf("parsed: %s\n", argv[i]); 
    114116        swish_debug_wordlist(list); 
     
    118120 
    119121    if (string != NULL) { 
    120         list = swish_tokenize(s3->analyzer, string, 0, 0, meta, meta); 
     122        list = swish_init_wordlist(); 
     123        list->ref_cnt++; 
     124        swish_tokenize(s3, string, list, 0, 0, meta, meta); 
    121125         
    122126        if (SWISH_DEBUG & SWISH_DEBUG_WORDLIST)