/usr/lib/perl5/KinoSearch1/Util/CClass.pm is in libkinosearch1-perl 1.00-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | package KinoSearch1::Util::CClass;
use strict;
use warnings;
use KinoSearch1::Util::ToolSet;
use base('KinoSearch1::Util::Class');
1;
__END__
__H__
#ifndef H_KINO_CCLASS
#define H_KINO_CCLASS 1
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "KinoSearch1UtilCarp.h"
#define KINO_START_SET_OR_GET_SWITCH \
/* if called as a setter, make sure the extra arg is there */ \
if (ix % 2 == 1 && items != 2) \
croak("usage: $seg_term_enum->set_xxxxxx($val)"); \
switch (ix) {
#define KINO_END_SET_OR_GET_SWITCH \
default: Kino1_confess("Internal error. ix: %d", ix); \
RETVAL = &PL_sv_undef; /* quiet compiler warning */ \
break; /* probably unreachable */ \
}
#define Kino1_extract_struct( perl_obj, dest, cname, class ) \
if (sv_derived_from( perl_obj, class )) { \
IV tmp = SvIV( (SV*)SvRV(perl_obj) ); \
dest = INT2PTR(cname, tmp); \
} \
else { \
dest = NULL; /* suppress unused var warning */ \
Kino1_confess("not a %s", class); \
}
#define Kino1_extract_anon_struct( perl_obj, dest ) \
if (sv_derived_from( perl_obj, "KinoSearch1::Util::CClass" )) { \
IV tmp = SvIV( (SV*)SvRV(perl_obj) ); \
dest = INT2PTR(void*, tmp); \
} \
else { \
dest = NULL; /* suppress unused var warning */ \
Kino1_confess("not derived from KinoSearch1::Util::CClass"); \
}
#define Kino1_extract_struct_from_hv(hash, dest, key, key_len, cname, class) \
{ \
SV **sv_ptr; \
sv_ptr = hv_fetch(hash, key, key_len, 0); \
if (sv_ptr == NULL) \
Kino1_confess("Failed to retrieve hash entry '%s'", key); \
if (sv_derived_from( *sv_ptr, class )) { \
IV tmp = SvIV( (SV*)SvRV(*sv_ptr) ); \
dest = INT2PTR(cname, tmp); \
} \
else { \
dest = NULL; /* suppress unused var warning */ \
Kino1_confess("not a %s", class); \
} \
}
#endif /* include guard */
__POD__
=begin devdocs
=head1 NAME
KinoSearch1::Util::CClass - base class for C-struct objects
=head1 DESCRIPTION
KinoSearch1's C-struct objects use this as a base class, rather than
KinoSearch1::Util::Class.
=head1 COPYRIGHT
Copyright 2005-2010 Marvin Humphrey
=head1 LICENSE, DISCLAIMER, BUGS, etc.
See L<KinoSearch1> version 1.00.
=end devdocs
=cut
|