From: hanmac@... Date: 2014-12-24T08:56:04+00:00 Subject: [ruby-core:67099] [ruby-trunk - Bug #10621] no parent in rb_data_type_t Issue #10621 has been updated by Hans Mackowiak. Koichi Sasada wrote: > I'm okay to revert for avoiding parent. > > However, I'm negative because parent abstraction is not good idea for rb_data_type_t. > > Reasons: > * You can make such checking code in few lines with `data` field. 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 > * mark, free, memsize doesn't care about `parent` (and difficult to care about `parent`. it depends on situations) 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) > * `rb_data_type_t` is not an official API (so that README.ext doesn't refer on it) 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 ---------------------------------------- Bug #10621: no parent in rb_data_type_t https://bugs.ruby-lang.org/issues/10621#change-50611 * 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/