summaryrefslogtreecommitdiff
path: root/dev-lang/gdl/files/0.9.6-fun-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/gdl/files/0.9.6-fun-fix.patch')
-rw-r--r--dev-lang/gdl/files/0.9.6-fun-fix.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/dev-lang/gdl/files/0.9.6-fun-fix.patch b/dev-lang/gdl/files/0.9.6-fun-fix.patch
deleted file mode 100644
index a3a4118ceb0a..000000000000
--- a/dev-lang/gdl/files/0.9.6-fun-fix.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Author: Vitaliy Tomin <highwaystar@users.sf.net>
-Description: Fix direct calling of direct function calls from Python
-Bug: https://sourceforge.net/p/gnudatalanguage/bugs/678
---- a/src/pythongdl.cpp
-+++ b/src/pythongdl.cpp
-@@ -392,25 +392,31 @@
-
- BaseGDL* retValGDL = NULL;
- Guard<BaseGDL> retValGDL_guard;
-- if( functionCall)
-- {
-- if( libCall)
-- retValGDL = static_cast<DLibFun*>(static_cast<EnvT*>(e)->
-- GetPro())->Fun()( static_cast<EnvT*>(e));
-- else
-- retValGDL = interpreter->call_fun(static_cast<DSubUD*>
-- (static_cast<EnvUDT*>(e)
-- ->GetPro())->GetTree());
-- retValGDL_guard.Reset( retValGDL);
-- }
-- else
-- {
-- if( libCall)
-- static_cast<DLibPro*>(e->GetPro())->Pro()(static_cast<EnvT*>(e)); // throws
-- else
-- interpreter->call_pro(static_cast<DSubUD*>
-- (e->GetPro())->GetTree()); //throws
-- }
-+
-+ if (functionCall) {
-+ DLibFun* sub_fun_chk = dynamic_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro());
-+ if (sub_fun_chk) {
-+ //handle direct call function first
-+ if (sub_fun_chk->DirectCall()) {
-+ BaseGDL* directCallParameter = e->GetParDefined(0);
-+ retValGDL = static_cast<DLibFunDirect*>(sub_fun_chk)->FunDirect()(directCallParameter, true /*isReference*/);
-+ }
-+ } else if (libCall)
-+ retValGDL = static_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro())
-+ ->Fun()(static_cast<EnvT *>(e));
-+ else
-+ retValGDL = interpreter->call_fun(
-+ static_cast<DSubUD *>(static_cast<EnvUDT *>(e)->GetPro())
-+ ->GetTree());
-+ retValGDL_guard.Reset(retValGDL);
-+ } else {
-+ if (libCall)
-+ static_cast<DLibPro *>(e->GetPro())
-+ ->Pro()(static_cast<EnvT *>(e)); // throws
-+ else
-+ interpreter->call_pro(
-+ static_cast<DSubUD *>(e->GetPro())->GetTree()); // throws
-+ }
-
- // copy back args and keywords
- success = CopyArgToPython( parRef, kwRef, *e, argTuple, kwDict);