ffi/ffi — pull request #166 by Burgestrand (2011-10-22 01:21:19+00:00)
Title: Fix warnings when reading ffi_convention in FFI::Library (by using an accessor)

Currently, [FFI::Library#function_names](https://github.com/ffi/ffi/blob/8e86ddbc78b552b11877dca9ee85e99d0fc87ee3/lib/ffi/library.rb#L265) throws a warning if you have not explicitly defined `ffi_convention`. This warning is thrown every time you call [FFI::Library#attach_function](https://github.com/ffi/ffi/blob/8e86ddbc78b552b11877dca9ee85e99d0fc87ee3/lib/ffi/library.rb#L230).

Now, since this check is done at two more places, I figured it’d be a good idea to have an accessor that defaults to the current default (`:default`) value. Using this accessor would avoid the warnings, and also avoid the need to check for `defined?(@ffi_convention)` all the time.