Subject: [ruby-ffi] Re: lists only one lib? |
From: rogerdpack |
Date: 12/23/09 12:26 PM |
To: ruby-ffi |
Looking at the ffi_lib code now, it is clear that subsequent ffi_lib calls are not good. Well, maybe we should make that totally explicit, and just don't allow to call ffi_lib the second time?Probably best to have ffi_libraisean exception if the libs are already set. That solves it nicely and keeps users from tripping up on this.
I would also humbly suggest having second calls to Struct#layout also raise, to avoid confusion [I assume they're not really expected]. -r