[ruby-core:65309] [ruby-trunk - Bug #10303] [Open] rb_data_type_t need to be described in README.EXT

From: hanmac@...
Date: 2014-09-28 11:49:14 UTC
List: ruby-core #65309
Issue #10303 has been reported by Hans Mackowiak.

----------------------------------------
Bug #10303:  rb_data_type_t need to be described in README.EXT
https://bugs.ruby-lang.org/issues/10303

* Author: Hans Mackowiak
* Status: Open
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version: 
* ruby -v: ruby 2.2.0dev (2014-09-27 trunk 47721) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
because untyped Data will be "deprecated" in the future, and TypedData is now more than 4 years old,
add an howto in the README.EXT how to effective use the "new" rb_data_type_t struct, 
because while porting i noticed many little problems that could cause an application to crash ...

like i did happen for me that the object got freed even if there was RUBY_TYPED_NEVER_FREE when RUBY_TYPED_FREE_IMMEDIATELY was used ... (i have a little protection around that object get not freed until the C struct dies first)

same append i got double free errors when using the size function for object that does have RUBY_TYPED_NEVER_FREE
same its not described what is the best way to design such a size function, 
and what flags can be used like RUBY_TYPED_FREE_IMMEDIATELY and RUBY_TYPED_WB_PROTECTED and what is the best way to use them



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next