File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11# Contribution Guide  
22## Add wrapper function for C  
3+ ### :warning :  Limitation 
4+ Go variable-length arguments cannot be passed directly to C functions
5+ 
6+ e.g. ` void rb_raise(VALUE exc, const char *fmt, ...) ` 
7+ 
8+ To avoid this problem, we need to call the C function without variable-length arguments
9+ 
10+ See ` RbRaise `  implementation in [ ruby-internal-error.go] ( ruby-internal-error.go )  for details
11+ 
312### 1. Generate skeleton  
413Run ` ruby _scripts/dump_ruby_c_functions.rb ` 
514
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ ref. https://docs.ruby-lang.org/ja/latest/function/index.html
190190*  [ ]  ` rb_frame_last_func ` 
191191*  [ ]  ` rb_free_generic_ivar ` 
192192*  [ ]  ` rb_frozen_class_p ` 
193- *  [ ]  ` rb_funcall ` 
193+ *  ~~ [  ]  ` rb_funcall ` ~~  Go's variable-length arguments couldn't be passed directly to C. See  [ CONTRIBUTING.md ] ( CONTRIBUTING.md ) 
194194*  [x]  ` rb_funcall2 ` 
195195*  [ ]  ` rb_funcall3 ` 
196196*  [x]  ` rb_funcallv ` 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments