-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I understand what CStructEntity is - it's a subclass of pointer that points to an instance of the structure in memory.
I don't really understand what CStruct is. It's an object that has a method that returns that subclass of pointer that you want to instantiate. Why not just pass the subclass of pointer in? Why have this entity_class indirection?
Could we write Fiddle::CStructBuilder.create(CUnion, types, members) instead of Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)?
I know about backwards compatibility concerns, but I don't understand the original intention behind this, and it isn't documented, and even as an FFI and Ruby expert I find it extremely confusing.
I also wish CStructEntity was CStructPointer, but again backwards compatibility I guess.