summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Meissner <wmeissner@gmail.com>2010-01-27 10:19:15 +1000
committerWayne Meissner <wmeissner@gmail.com>2010-01-27 10:19:51 +1000
commit5e5e59cbf3553783751bc528df486a9016f44e2e (patch)
tree03d5c6b744bd9992c5ab8e2d4c0d9f30e19570e6
parent1898eeb8f7e0d351a7954324e4b5491e3374ef4e (diff)
downloadffi-5e5e59cbf3553783751bc528df486a9016f44e2e.tar.gz
Fix unused var warning
-rw-r--r--ext/ffi_c/StructLayout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ffi_c/StructLayout.c b/ext/ffi_c/StructLayout.c
index 688fe08..2ab4131 100644
--- a/ext/ffi_c/StructLayout.c
+++ b/ext/ffi_c/StructLayout.c
@@ -242,12 +242,11 @@ array_field_put(VALUE self, VALUE pointer, VALUE value)
{
StructField* f;
ArrayType* array;
- MemoryOp* op;
+
Data_Get_Struct(self, StructField, f);
Data_Get_Struct(f->rbType, ArrayType, array);
-
if (isCharArray(array) && rb_obj_is_instance_of(value, rb_cString)) {
VALUE argv[2];
@@ -258,6 +257,7 @@ array_field_put(VALUE self, VALUE pointer, VALUE value)
} else {
#ifdef notyet
+ MemoryOp* op;
int count = RARRAY_LEN(value);
int i;
AbstractMemory* memory = MEMORY(pointer);