2 #############################################################################
3 ## Name: script/make_typemap.pl
4 ## Purpose: Preprocess the typemap file
5 ## Author: Mattia Barbon
8 ## RCS-ID: $Id: make_typemap.pl 2050 2007-05-13 18:38:33Z mbarbon $
9 ## Copyright: (c) 2007 Mattia Barbon
10 ## Licence: This program is free software; you can redistribute it and/or
11 ## modify it under the same terms as Perl itself
12 #############################################################################
15 use Fatal qw(open close);
17 open my $in, '<', $ARGV[0];
22 s{typemap\.tmpl}{typemap};
23 s{PERL_CLASS}'${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}'g;
24 s{CPP_CLASS}'${(my $t=$type)=~s/^Wx_/wx/;\$t}'g;
26 open my $out, '>', $ARGV[1];