summaryrefslogtreecommitdiff
path: root/lib/ffi/struct_layout_builder.rb
Commit message (Collapse)AuthorAgeFilesLines
* Freeze immutable objects and add explicit make_shareable to make library ↵Lars Kanis2023-05-071-2/+2
| | | | | | | | | | | | | | | | | | | definitions Ractor usable Freeze objects which are immutable from the start are now freezed. This allows these objects to be used by Ractor without make_shareable. This partially reverts commit 4fc6a8c5ec8a9a720330946af9d1103015c62942 in such a way, that functions are stored in a module variable @ffi_functions. Enums are implemented per FFI::Library not per attached function. To make them shareable they would have to be copied and freezed per function. This would increase memory footprint for the sake of Ractor support. IMHO it's better to mark the module explicit as finished by .freeze to allow its use in a Ractor. This also enables querying the enum definitions from a Ractor. Using a Hash instead of per-function variables allow to use foo! and bar? methods as wished in #971. Fixes #971
* Freeze constant in StructLayoutBuilderLars Kanis2023-04-181-2/+2
| | | | since there's no need to modify it later on
* - Suppress deprecated Fixnum warnings on Ruby 2.4.0.Jun Aruga2017-02-131-1/+1
| | | | - Add Ruby 2.4.0 to .travis.yml
* doc tweakstduehr2015-05-221-18/+23
|
* fix yard doc warningsNick White2014-09-031-2/+2
|
* Switch license to BSD throughout codebase. See #288.Charles Oliver Nutter2013-10-291-11/+22
|
* Merge remote-tracking branch 'upstream/master'Sylvain Daubert2012-12-081-1/+4
|\ | | | | | | | | | | Conflicts: ext/ffi_c/MemoryPointer.c lib/ffi/struct.rb
| * Fix initialization of StructLayouts that are unions. Fixes #204.Wayne Meissner2012-05-091-1/+3
| |
| * Add experimental support for long double. Fixes issue #194Wayne Meissner2012-02-281-0/+1
| |
* | Add documentation (mainly for Struct and its decendants).Sylvain Daubert2011-10-021-1/+50
|/
* Fix issue #114 (Structs no longer support bools).Wayne Meissner2011-05-291-1/+2
|
* License update and misc cleanups.Wayne Meissner2010-08-071-43/+35
|
* Add custom data converters for parameter and return typesWayne Meissner2010-05-221-37/+39
|
* Allow StructLayout::Field subclasses to be used as the :type param to ↵Wayne Meissner2010-04-221-5/+40
| | | | StructLayoutBuilder#add()
* StructLayout#initialize() now takes an array of StructLayout::Field ↵Wayne Meissner2010-04-181-12/+5
| | | | instances instead of an array of names and a map
* StructLayoutBuilder#store_field() does not need the type param, as ↵Wayne Meissner2010-04-171-4/+4
| | | | StructLayout::Field as all the type info
* Rename some StructLayout inner classes to reflect the JRuby onesWayne Meissner2010-04-171-13/+35
|
* Rename StructLayout::InlineStruct to StructLayout::InnerStruct to match with ↵Wayne Meissner2010-04-171-1/+2
| | | | jruby-1.6
* Convert StructLayoutBuilder to ruby, and allow packing to take an optional ↵Wayne Meissner2010-04-161-0/+113
packing boundary