From c08ce3f7bcc3527402b758049f10d8bb79c9e90c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 30 Apr 2017 06:55:34 -0700 Subject: ffi: housecleaning: reorder type sym declarations. * ffi.c: Move declarations of array_s and zarray_s after void_s, to keep built-in FFI types together. Eliminate some blank lines. (ffi_init): Move initialization of void_s to to match declaration order. * ffi.h: Update declarations of type symbol variables to match ffi.c. (struct_s): Now declared. --- ffi.c | 6 ++---- ffi.h | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ffi.c b/ffi.c index 6b42d97d..298000ad 100644 --- a/ffi.c +++ b/ffi.c @@ -61,13 +61,11 @@ val char_s, uchar_s, wchar_s; val short_s, ushort_s; val int_s, uint_s; val long_s, ulong_s; - val double_s; +val void_s; val array_s, zarray_s; -val void_s; - val struct_s; val str_d_s, wstr_s, wstr_d_s; @@ -1637,9 +1635,9 @@ void ffi_init(void) long_s = intern(lit("long"), user_package); ulong_s = intern(lit("ulong"), user_package); double_s = intern(lit("double"), user_package); + void_s = intern(lit("void"), user_package); array_s = intern(lit("array"), user_package); zarray_s = intern(lit("zarray"), user_package); - void_s = intern(lit("void"), user_package); struct_s = intern(lit("struct"), user_package); str_d_s = intern(lit("str-d"), user_package); wstr_s = intern(lit("wstr"), user_package); diff --git a/ffi.h b/ffi.h index 098f3798..12d9705a 100644 --- a/ffi.h +++ b/ffi.h @@ -34,19 +34,19 @@ extern val char_s, uchar_s, wchar_s; extern val short_s, ushort_s; extern val int_s, uint_s; extern val long_s, ulong_s; - +extern val void_s; extern val double_s; +extern val array_s, zarray_s; + +extern val struct_s; + extern val str_d_s, wstr_s, wstr_d_s; extern val buf_d_s; extern val ptr_in_s, ptr_out_s, ptr_in_d_s, ptr_out_d_s, ptr_s; -extern val array_s, zarray_s; - -extern val void_s; - extern val ffi_type_s, ffi_call_desc_s; val ffi_type_compile(val syntax); -- cgit v1.2.3