Created
          June 27, 2014 14:40 
        
      - 
      
- 
        Save rurban/3d7fac25d31785b472ac to your computer and use it in GitHub Desktop. 
    pcc gh1080
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | my $sigtype = {'P' => 'pmc', | |
| 'S' => 'string', | |
| 'I' => 'integer', | |
| 'N' => 'number'}; | |
| my $arg_index = 0; | |
| my @sig_vals = split(//, $params_signature); | |
| my @params_vararg_list = split(/, &/,substr($params_varargs, 1)); | |
| foreach my $sig (@sig_vals) { | |
| if ($sigtype{$sig}) { | |
| my $type = $sigtype{$sig}; | |
| $e->emit( <<"END"); | |
| $params_vararg_list[$arg_index] = VTABLE_get_${type}_keyed_int(interp, _call_object, $arg_index); | |
| END | |
| $arg_index++; | |
| } | |
| else { | |
| # TODO check for the other sig modifiers: i, o, s | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment