File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/main/ruby/core/truffle/ffi Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Bug fixes:
11
11
* Calling ` Kernel#raise ` with a raised exception will no longer set the cause of the exception to itself (#1682 ).
12
12
* Return a ` FFI::Function ` correctly for functions returning a callback.
13
13
* Convert to intuitive Ruby exceptions when INVOKE fails (#1690 ).
14
+ * Implemented ` FFI::Pointer#clear ` (#1687 ).
14
15
15
16
Compatibility
16
17
Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ def initialize_copy(from)
86
86
self
87
87
end
88
88
89
+ def clear
90
+ raise RuntimeError , 'cannot clear unbounded memory area' unless @total
91
+ Truffle . invoke_primitive :pointer_clear , self , @total
92
+ end
93
+
89
94
def inspect
90
95
# Don't have this print the data at the location. It can crash everything.
91
96
addr = address ( )
You can’t perform that action at this time.
0 commit comments