From f0250d6ccb9eaf8bd88fa9621ea3702091f41d6b Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Mon, 10 Mar 2003 18:34:23 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4496 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/ruby.cxx | 29 +++++++++++++++++++++++++++++ TODO | 2 ++ 2 files changed, 31 insertions(+) diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx index 6953acb3d..5f6924711 100644 --- a/Source/Modules/ruby.cxx +++ b/Source/Modules/ruby.cxx @@ -1247,6 +1247,33 @@ public: Replaceall(klass->header,"$freeproto", ""); } + void baseClassHandler(Node *n) { + Node *c; + for (c = firstChild(n); c; c = nextSibling(c)) { + char *tag = Char(nodeType(c)); + if (!tag) { + Printf(stderr,"SWIG: Fatal internal error. Malformed parse tree node!\n"); + return; + } + // emit_one(c); + } + } + + void copyBaseClassMembers(Node *n) { + List *baselist = Getattr(n,"bases"); + if (baselist && Len(baselist) > 0) { + /* Skip the first base class */ + Node *base = Firstitem(baselist); + + /* Loop over remaining base classes */ + base = Nextitem(baselist); + while (base) { + baseClassHandler(base); + base = Nextitem(baselist); + } + } + } + /* ---------------------------------------------------------------------- * classHandler() * ---------------------------------------------------------------------- */ @@ -1288,6 +1315,8 @@ public: "$freeproto", NIL); + copyBaseClassMembers(n); + Language::classHandler(n); handleBaseClasses(n); diff --git a/TODO b/TODO index 43afd85a7..8cc941f56 100644 --- a/TODO +++ b/TODO @@ -191,6 +191,8 @@ Tcl Ruby ---- +**** Add Ruby support for Mark Rose's polymorphism code. + **** Investigate the new object allocation framework that has been implemented for Ruby 1.8 and determine what (if anything) needs to be changed for the wrapper code generated by SWIG. For background