diff options
Diffstat (limited to 'include/ruby/internal/core/rdata.h')
-rw-r--r-- | include/ruby/internal/core/rdata.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/ruby/internal/core/rdata.h b/include/ruby/internal/core/rdata.h index e4c146a716..cab412af72 100644 --- a/include/ruby/internal/core/rdata.h +++ b/include/ruby/internal/core/rdata.h @@ -133,6 +133,12 @@ struct RData { */ RUBY_DATA_FUNC dmark; + /** Pointer to the actual C level struct that you want to wrap. + * This is in between dmark and dfree to allow DATA_PTR to continue + * to work for both RData and non-embedded RTypedData. + */ + void *data; + /** * This function is called when the object is no longer used. You need to * do whatever necessary to avoid memory leaks. @@ -141,9 +147,6 @@ struct RData { * impossible at that moment (that is why GC runs). */ RUBY_DATA_FUNC dfree; - - /** Pointer to the actual C level struct that you want to wrap. */ - void *data; }; RBIMPL_SYMBOL_EXPORT_BEGIN() |