From e6cb11e9ba206b2dbd2169c8126dba346ff08b2a Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Tue, 11 Mar 2003 13:37:51 +0000 Subject: [PATCH] Added $descriptor() support to code supplied to methods in %extend sections. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4509 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/lang.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SWIG/Source/Modules/lang.cxx b/SWIG/Source/Modules/lang.cxx index 946d967aa..e829f97e7 100644 --- a/SWIG/Source/Modules/lang.cxx +++ b/SWIG/Source/Modules/lang.cxx @@ -695,6 +695,16 @@ int Language::cDeclaration(Node *n) { /* If in import mode, we proceed no further */ if (ImportMode) return SWIG_NOWRAP; + /* If we're in extend mode and there is code, replace the $descriptor macros */ + if (Getattr(n,"feature:extend")) { + String *code = Getattr(n,"code"); + if (code) { + Setfile(code,Getfile(n)); + Setline(code,Getline(n)); + Swig_cparse_replace_descriptor(code); + } + } + /* Overloaded symbol check */ over = Swig_symbol_isoverloaded(n); if (!overloading) {