From: ko1@... Date: 2014-12-24T09:38:34+00:00 Subject: [ruby-core:67100] [ruby-trunk - Bug #10621] no parent in rb_data_type_t Issue #10621 has been updated by Koichi Sasada. > No does not work because its about rb_check_typeddata, how else should a function know if the object i have can be turned to the given type? it cant be done nicely with the data field because i need to do all checks the rb_check_typeddata function does by my self before too Why does not it work? > And thats a good point for me, because i have objects of the class that should not always be deleted because it might cause segfaults, thats why i have two data_type for the same class (i dont know of a better way to do that) Could you explain more? I can't understand your sitation. Sample code are very welcome. > as Eric did said that the old API with unchecked is getting deprecated, the new one should be added to the README.ext, same for the scan_kargs function To make official API, we remove `parent` filed because it is ad-hoc, not considered field. At first, original T_DATA structure is not deprecate. Most of case it is enough, I think. And I agree that it is not enough for some case and it is good to become deprecate. So let's start to discuss about it. Your case will be nice example to discuss to make it official API. ---------------------------------------- Bug #10621: no parent in rb_data_type_t https://bugs.ruby-lang.org/issues/10621#change-50612 * Author: Hans Mackowiak * Status: Closed * Priority: Immediate * Assignee: Nobuyoshi Nakada * Category: core * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0dev (2014-12-19 trunk 48891) [x86_64-linux] * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED ---------------------------------------- `rb_data_type_t` does need to have a parent type otherwise it cant bind objects anymore that have a tree style ClassTree like in C++ or simulated with gtk in C++ like Class B and Class C does inherit both Class A, cant be ported with ruby anymore because with that Class A cant have its own datatype anymore because the datatype check does break the inheritence. (id did worked before because it did had parent -- https://bugs.ruby-lang.org/