perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r34183 - trunk/lib/Parrot/Pmc2c

Subject: [svn:parrot] r34183 - trunk/lib/Parrot/Pmc2c
From:
Date: Sat, 20 Dec 2008 21:06:53 -0800 PST
Newsgroups: perl.cvs.parrot

Author: petdance
Date: Sat Dec 20 21:06:52 2008
New Revision: 34183

Modified:
   trunk/lib/Parrot/Pmc2c/MethodEmitter.pm

Log:
Cleaning up quotes, removed unnecessary imports, updated copyright

Modified: trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/MethodEmitter.pm     (original)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm     Sat Dec 20 21:06:52 2008
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007, The Perl Foundation.
+# Copyright (C) 2004-2008, The Perl Foundation.
 
 # $Id$
 
@@ -23,10 +23,10 @@
 package Parrot::Pmc2c::Method;
 use strict;
 use warnings;
-use Parrot::Pmc2c::Emitter;
+use Parrot::Pmc2c::Emitter ();
 use Parrot::Pmc2c::UtilFunctions
     qw( gen_ret dont_edit count_newlines dynext_load_code c_code_coda );
-use Parrot::Pmc2c::PCCMETHOD;
+use Parrot::Pmc2c::PCCMETHOD ();
 
 =item C<generate_body($pmc)>
 
@@ -65,9 +65,8 @@
 
 sub generate_headers {
     my ( $self, $pmc ) = @_;
-    my $hout = "";
 
-    $hout .= $self->decl( $pmc, 'HEADER' );
+    my $hout = $self->decl( $pmc, 'HEADER' );
 
     if ( $self->mmds ) {
         for my $mmd ( @{ $self->mmds } ) {
@@ -106,16 +105,16 @@
     $decorators = join($/, @$decs, '');
     if ( $for_header eq 'HEADER' ) {
         $export = $pmc->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT 
';
-        $extern = "";
-        $newl   = " ";
-        $semi   = ";";
-        $interp = $pmcvar = "";
+        $extern = '';
+        $newl   = ' ';
+        $semi   = ';';
+        $interp = $pmcvar = '';
     }
     else {
-        $export = "";
-        $extern = "";
+        $export = '';
+        $extern = '';
         $newl   = "\n";
-        $semi   = "";
+        $semi   = '';
         $interp = 'interp';
         $pmcvar = 'pmc';
     }
@@ -133,32 +132,32 @@
 =cut
 
 my %calltype = (
-    "char"     => "c",
-    "short"    => "s",
-    "char"     => "c",
-    "short"    => "s",
-    "int"      => "i",
-    "INTVAL"   => "I",
-    "float"    => "f",
-    "FLOATVAL" => "N",
-    "double"   => "d",
-    "STRING*"  => "S",
-    "STRING *" => "S",
-    "char*"    => "t",
-    "char *"   => "t",
-    "PMC*"     => "P",
-    "PMC *"    => "P",
-    "short*"   => "2",
-    "short *"  => "2",
-    "int*"     => "3",
-    "int *"    => "3",
-    "long*"    => "4",
-    "long *"   => "4",
-    "void"     => "v",
-    "void*"    => "b",
-    "void *"   => "b",
-    "void**"   => "B",
-    "void **"  => "B",
+    'char'     => 'c',
+    'short'    => 's',
+    'char'     => 'c',
+    'short'    => 's',
+    'int'      => 'i',
+    'INTVAL'   => 'I',
+    'float'    => 'f',
+    'FLOATVAL' => 'N',
+    'double'   => 'd',
+    'STRING*'  => 'S',
+    'STRING *' => 'S',
+    'char*'    => 't',
+    'char *'   => 't',
+    'PMC*'     => 'P',
+    'PMC *'    => 'P',
+    'short*'   => '2',
+    'short *'  => '2',
+    'int*'     => '3',
+    'int *'    => '3',
+    'long*'    => '4',
+    'long *'   => '4',
+    'void'     => 'v',
+    'void*'    => 'b',
+    'void *'   => 'b',
+    'void**'   => 'B',
+    'void **'  => 'B',
 
     #"BIGNUM*" => "???" # RT#43731
     #"BIGNUM *"=> "???" # RT#43731

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r34183 - trunk/lib/Parrot/Pmc2c, petdance <=