Changeset 2045 for libswish3/trunk/bindings/perl/3.xs
- Timestamp:
- 03/07/08 22:32:33 (10 months ago)
- Files:
-
- libswish3/trunk/bindings/perl/3.xs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libswish3/trunk/bindings/perl/3.xs
r2029 r2045 163 163 164 164 // 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--; 166 170 //warn("set_config ref_cnt of old config = %d", self->config->ref_cnt); 167 171 if (self->config->ref_cnt < 1) { … … 189 193 190 194 // 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--; 192 200 //warn("set_analyzer ref_cnt of old analyzer: %d", self->analyzer->ref_cnt); 193 201 if (self->analyzer->ref_cnt < 1) { … … 211 219 212 220 // 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--; 214 226 if (self->parser->ref_cnt < 1) { 215 227 if (SWISH_DEBUG) { … … 342 354 INCLUDE: XS/Data.xs 343 355 INCLUDE: XS/Stash.xs 344 356 INCLUDE: XS/Property.xs 357 INCLUDE: XS/MetaName.xs 358 INCLUDE: XS/PropertyHash.xs 359 INCLUDE: XS/MetaNameHash.xs 360 INCLUDE: XS/xml2Hash.xs 361 362
