From 5ceefca1e14ffaa17dc3103ecd25160e1af189b7 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Thu, 4 May 2023 18:19:29 +0200 Subject: Remove no longer used StructField.get and .put It was introduced in commit 9d68c7f87ad7c869ee1ce3139269525af70e5df4 but moved to ruby code in commit 3f96bbb61b2f17ba9761a1d02745101a60cd26e1 . These fields are a leftover from the commit. --- ext/ffi_c/Struct.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'ext/ffi_c/Struct.c') diff --git a/ext/ffi_c/Struct.c b/ext/ffi_c/Struct.c index 9eb10ec..3e4f8d1 100644 --- a/ext/ffi_c/Struct.c +++ b/ext/ffi_c/Struct.c @@ -356,10 +356,7 @@ struct_aref(VALUE self, VALUE fieldName) s = struct_validate(self); f = struct_field(s, fieldName); - if (f->get != NULL) { - return (*f->get)(f, s); - - } else if (f->memoryOp != NULL) { + if (f->memoryOp != NULL) { return (*f->memoryOp->get)(s->pointer, f->offset); } else { @@ -385,10 +382,7 @@ struct_aset(VALUE self, VALUE fieldName, VALUE value) s = struct_validate(self); f = struct_field(s, fieldName); - if (f->put != NULL) { - (*f->put)(f, s, value); - - } else if (f->memoryOp != NULL) { + if (f->memoryOp != NULL) { (*f->memoryOp->put)(s->pointer, f->offset, value); -- cgit v1.2.1