aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
diff options
context:
space:
mode:
authorMic Bowman2013-02-19 22:53:46 -0800
committerMic Bowman2013-02-19 22:53:46 -0800
commit903b40b47e53cc131b57919e8a8a83db3cb36f96 (patch)
treedbba969abe346afa0ebc0539ebc9df9493b431f6 /OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
parentDeleted all AssemblyFileVersion directives (diff)
downloadopensim-SC_OLD-903b40b47e53cc131b57919e8a8a83db3cb36f96.zip
opensim-SC_OLD-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.gz
opensim-SC_OLD-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.bz2
opensim-SC_OLD-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.xz
Fix the JsonStore path set problem justincc found earlier today and
remove the deprecated TestPath functions.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs28
1 files changed, 3 insertions, 25 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index ca3989a..40adba1 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -84,11 +84,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
84 protected static Regex m_PathComponent = new Regex("\\.({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); 84 protected static Regex m_PathComponent = new Regex("\\.({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])");
85 85
86 // extract the internals of an array reference 86 // extract the internals of an array reference
87 protected static Regex m_SimpleArrayPattern = new Regex("\\[([0-9]+)\\]"); 87 protected static Regex m_SimpleArrayPattern = new Regex("^\\[([0-9]+)\\]$");
88 protected static Regex m_ArrayPattern = new Regex("\\[([0-9]+|\\+)\\]"); 88 protected static Regex m_ArrayPattern = new Regex("^\\[([0-9]+|\\+)\\]$");
89 89
90 // extract the internals of a has reference 90 // extract the internals of a has reference
91 protected static Regex m_HashPattern = new Regex("{([^}]+)}"); 91 protected static Regex m_HashPattern = new Regex("^{([^}]+)}$");
92 92
93 // ----------------------------------------------------------------- 93 // -----------------------------------------------------------------
94 /// <summary> 94 /// <summary>
@@ -173,28 +173,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
173 /// 173 ///
174 /// </summary> 174 /// </summary>
175 // ----------------------------------------------------------------- 175 // -----------------------------------------------------------------
176 public bool TestPath(string expr, bool useJson)
177 {
178 Stack<string> path;
179 if (! ParsePathExpression(expr,out path))
180 return false;
181
182 OSD result = ProcessPathExpression(ValueStore,path);
183
184 if (result == null)
185 return false;
186
187 if (useJson || OSDBaseType(result.Type))
188 return true;
189
190 return false;
191 }
192
193 // -----------------------------------------------------------------
194 /// <summary>
195 ///
196 /// </summary>
197 // -----------------------------------------------------------------
198 public int ArrayLength(string expr) 176 public int ArrayLength(string expr)
199 { 177 {
200 Stack<string> path; 178 Stack<string> path;