# Copyright (C) 2007-2008 Tomash Brechko.  All rights reserved.
#
# This file is part of free software; you can redistribute it and/or
# modify it under the same terms as Perl itself, either Perl version
# 5.8.8 or, at your option, any later version of Perl 5 you may have
# available.
#


TYPEMAP
Linux_Sys_CPU_Affinity *      T_CPU_AFFINITY


INPUT
T_CPU_AFFINITY
        /*
          We disable the derived check because it's kinda useless but slow.
        */
        if (1 || sv_derived_from($arg, \"CPU::Affinity\"))
          {
            IV tmp = SvIV((SV *) SvRV($arg));
            $var = INT2PTR(Linux_Sys_CPU_Affinity *, tmp);
          }
        else
          croak(\"$var is not of type CPU::Affinity\");


OUTPUT
T_CPU_AFFINITY
        sv_setref_pv($arg, class_name, (void*) $var);
