aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-08-13 14:13:49 +0000
committerCharles Krinke2008-08-13 14:13:49 +0000
commit323ada012d3bed0c6f7a6d5d0ee14b409b7457c7 (patch)
treed5a2e30707baba7804aefb341774d6d51ca7b439 /OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs
parentThank you, tyre, for a patch that fixes a null reference in LSL (diff)
downloadopensim-SC_OLD-323ada012d3bed0c6f7a6d5d0ee14b409b7457c7.zip
opensim-SC_OLD-323ada012d3bed0c6f7a6d5d0ee14b409b7457c7.tar.gz
opensim-SC_OLD-323ada012d3bed0c6f7a6d5d0ee14b409b7457c7.tar.bz2
opensim-SC_OLD-323ada012d3bed0c6f7a6d5d0ee14b409b7457c7.tar.xz
Mantis#1931. Thank you kindly, Kinoc for a patch that:
* Yield Prolog 1.0.1 Released : it passes all but 9 of the 421 tests in the ISO Prolog test suite (97.8%) . * support dynamic predicates and rules. * support 'import' to use external static functions improves connection to C# functions * Matches Yield Prolog r831
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs
index 907bfca..b237a82 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs
@@ -53,6 +53,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
53 { 53 {
54 } 54 }
55 55
56 // disable warning on l1, don't see how we can
57 // code this differently
58 #pragma warning disable 0168
59 /// If arg is another Functor3, then succeed (yield once) if this and arg have the
60 /// same name and all functor args unify, otherwise fail (don't yield).
61 /// If arg is a Variable, then call its unify to unify with this.
62 /// Otherwise fail (don't yield).
56 public IEnumerable<bool> unify(object arg) 63 public IEnumerable<bool> unify(object arg)
57 { 64 {
58 arg = YP.getValue(arg); 65 arg = YP.getValue(arg);
@@ -61,9 +68,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
61 Functor3 argFunctor = (Functor3)arg; 68 Functor3 argFunctor = (Functor3)arg;
62 if (_name.Equals(argFunctor._name)) 69 if (_name.Equals(argFunctor._name))
63 { 70 {
64// disable warning: don't see how we can code this differently short
65// of rewriting the whole thing
66#pragma warning disable 0168
67 foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) 71 foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1))
68 { 72 {
69 foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) 73 foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2))
@@ -72,19 +76,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
72 yield return false; 76 yield return false;
73 } 77 }
74 } 78 }
75#pragma warning restore 0168
76 } 79 }
77 } 80 }
78 else if (arg is Variable) 81 else if (arg is Variable)
79 { 82 {
80// disable warning: don't see how we can code this differently short
81// of rewriting the whole thing
82#pragma warning disable 0168
83 foreach (bool l1 in ((Variable)arg).unify(this)) 83 foreach (bool l1 in ((Variable)arg).unify(this))
84 yield return false; 84 yield return false;
85#pragma warning restore 0168
86 } 85 }
87 } 86 }
87 #pragma warning restore 0168
88 88
89 public override string ToString() 89 public override string ToString()
90 { 90 {