Show
Ignore:
Timestamp:
03/07/08 22:32:33 (10 months ago)
Author:
karpet
Message:

new config support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libswish3/trunk/bindings/perl/3.xs

    r2029 r2045  
    163163 
    164164    // set_config 
    165     case 1:  self->config->ref_cnt--; 
     165    case 1:  if (!sv_derived_from(ST(1), CONFIG_CLASS)) { 
     166                croak("usage: must be a %s object", CONFIG_CLASS); 
     167             } 
     168     
     169             self->config->ref_cnt--; 
    166170             //warn("set_config ref_cnt of old config = %d", self->config->ref_cnt); 
    167171             if (self->config->ref_cnt < 1) { 
     
    189193 
    190194    // set_analyzer 
    191     case 3:  self->analyzer->ref_cnt--; 
     195    case 3:  if (!sv_derived_from(ST(1), ANALYZER_CLASS)) { 
     196                croak("usage: must be a %s object", ANALYZER_CLASS); 
     197             } 
     198              
     199             self->analyzer->ref_cnt--; 
    192200             //warn("set_analyzer ref_cnt of old analyzer: %d", self->analyzer->ref_cnt); 
    193201             if (self->analyzer->ref_cnt < 1) { 
     
    211219 
    212220    // set_parser 
    213     case 5:  self->parser->ref_cnt--; 
     221    case 5:  if (!sv_derived_from(ST(1), PARSER_CLASS)) { 
     222                croak("usage: must be a %s object", PARSER_CLASS); 
     223             } 
     224              
     225             self->parser->ref_cnt--; 
    214226             if (self->parser->ref_cnt < 1) { 
    215227                if (SWISH_DEBUG) { 
     
    342354INCLUDE: XS/Data.xs 
    343355INCLUDE: XS/Stash.xs 
    344  
     356INCLUDE: XS/Property.xs 
     357INCLUDE: XS/MetaName.xs 
     358INCLUDE: XS/PropertyHash.xs 
     359INCLUDE: XS/MetaNameHash.xs 
     360INCLUDE: XS/xml2Hash.xs 
     361 
     362