@@ -975,14 +975,13 @@ def rb_path_to_class(path)
975
975
976
976
def rb_proc_new ( function , value )
977
977
Proc . new do |*args , &block |
978
- Primitive . cext_unwrap (
979
- Primitive . call_with_c_mutex_and_frame ( function , [
980
- Primitive . cext_wrap ( args . first ) , # yieldarg
981
- Primitive . cext_wrap ( value ) , # procarg,
982
- args . size , # argc
983
- Truffle ::CExt . RARRAY_PTR ( args ) , # argv
984
- Primitive . cext_wrap ( block ) , # blockarg
985
- ] , Primitive . caller_special_variables_if_available , nil ) )
978
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( function , [
979
+ Primitive . cext_wrap ( args . first ) , # yieldarg
980
+ Primitive . cext_wrap ( value ) , # procarg,
981
+ args . size , # argc
982
+ Truffle ::CExt . RARRAY_PTR ( args ) , # argv
983
+ Primitive . cext_wrap ( block ) , # blockarg
984
+ ] , Primitive . caller_special_variables_if_available , nil )
986
985
end
987
986
end
988
987
@@ -1227,7 +1226,7 @@ def rb_enumeratorize(obj, meth, args)
1227
1226
def rb_enumeratorize_with_size ( obj , meth , args , size_fn )
1228
1227
return rb_enumeratorize ( obj , meth , args ) if size_fn . nil?
1229
1228
enum = obj . to_enum ( meth , *args ) do
1230
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex_and_frame ( size_fn , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( args ) , Primitive . cext_wrap ( enum ) ] , Primitive . caller_special_variables_if_available , nil ) )
1229
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( size_fn , [ Primitive . cext_wrap ( obj ) , Primitive . cext_wrap ( args ) , Primitive . cext_wrap ( enum ) ] , Primitive . caller_special_variables_if_available , nil )
1231
1230
end
1232
1231
enum
1233
1232
end
@@ -1242,7 +1241,7 @@ def rb_newobj_of(ruby_class)
1242
1241
1243
1242
def rb_define_alloc_func ( ruby_class , function )
1244
1243
ruby_class . singleton_class . define_method ( :__allocate__ ) do
1245
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex_and_frame ( function , [ Primitive . cext_wrap ( self ) ] , Primitive . caller_special_variables_if_available , nil ) )
1244
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( function , [ Primitive . cext_wrap ( self ) ] , Primitive . caller_special_variables_if_available , nil )
1246
1245
end
1247
1246
class << ruby_class
1248
1247
private :__allocate__
@@ -1667,13 +1666,13 @@ def rb_thread_call_without_gvl(function, data1, unblock, data2)
1667
1666
def rb_iterate ( iteration , iterated_object , callback , callback_arg )
1668
1667
block = rb_block_proc
1669
1668
wrapped_callback = proc do |block_arg |
1670
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex_and_frame ( callback , [
1669
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( callback , [
1671
1670
Primitive . cext_wrap ( block_arg ) ,
1672
1671
Primitive . cext_wrap ( callback_arg ) ,
1673
1672
0 , # argc
1674
1673
nil , # argv
1675
1674
nil , # blockarg
1676
- ] , Primitive . cext_special_variables_from_stack , block ) )
1675
+ ] , Primitive . cext_special_variables_from_stack , block )
1677
1676
end
1678
1677
Primitive . cext_unwrap (
1679
1678
Primitive . call_with_c_mutex_and_frame ( iteration , [ Primitive . cext_wrap ( iterated_object ) ] , Primitive . cext_special_variables_from_stack , wrapped_callback ) )
@@ -1785,7 +1784,7 @@ def rb_define_hooked_variable(name, gvar, getter, setter)
1785
1784
id = name . to_sym
1786
1785
1787
1786
getter_proc = -> {
1788
- Primitive . cext_unwrap ( Primitive . call_with_c_mutex_and_frame ( getter , [ Primitive . cext_wrap ( id ) , gvar , Primitive . cext_wrap ( nil ) ] , Primitive . caller_special_variables_if_available , nil ) )
1787
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( getter , [ Primitive . cext_wrap ( id ) , gvar , Primitive . cext_wrap ( nil ) ] , Primitive . caller_special_variables_if_available , nil )
1789
1788
}
1790
1789
1791
1790
setter_proc = -> value {
@@ -1910,14 +1909,13 @@ def rb_fiber_current
1910
1909
1911
1910
def rb_fiber_new ( function , value )
1912
1911
Fiber . new do |*args |
1913
- Primitive . cext_unwrap (
1914
- Primitive . call_with_c_mutex_and_frame ( function , [
1915
- Primitive . cext_wrap ( args . first ) , # yieldarg
1916
- nil , # procarg,
1917
- 0 , # argc
1918
- nil , # argv
1919
- nil , # blockarg
1920
- ] , nil , nil ) )
1912
+ Primitive . call_with_c_mutex_and_frame_and_unwrap ( function , [
1913
+ Primitive . cext_wrap ( args . first ) , # yieldarg
1914
+ nil , # procarg,
1915
+ 0 , # argc
1916
+ nil , # argv
1917
+ nil , # blockarg
1918
+ ] , nil , nil )
1921
1919
end
1922
1920
end
1923
1921
0 commit comments