source: typemap @ 4aeff5

Revision 4aeff5, 842 bytes checked in by Tomash Brechko <tomash.brechko@…>, 4 years ago (diff)

Disable the derived check.

  • Property mode set to 100644
Line 
1# Copyright (C) 2007-2008 Tomash Brechko.  All rights reserved.
2#
3# This file is part of free software; you can redistribute it and/or
4# modify it under the same terms as Perl itself, either Perl version
5# 5.8.8 or, at your option, any later version of Perl 5 you may have
6# available.
7#
8
9
10TYPEMAP
11Cache_Memcached_Fast *      T_CACHE_MEMCACHED_FAST
12
13
14INPUT
15T_CACHE_MEMCACHED_FAST
16        /*
17          We disable the derived check because it's kinda useless but
18          slow.
19        */
20        if (1 || sv_derived_from($arg, \"Cache::Memcached::Fast\"))
21          {
22            IV tmp = SvIV((SV *) SvRV($arg));
23            $var = INT2PTR(Cache_Memcached_Fast *, tmp);
24          }
25        else
26          croak(\"$var is not of type Cache::Memcached::Fast\");
27
28
29OUTPUT
30T_CACHE_MEMCACHED_FAST
31        sv_setref_pv($arg, class, (void*) $var);
Note: See TracBrowser for help on using the repository browser.