diff options
author | Mic Bowman | 2013-02-19 22:53:46 -0800 |
---|---|---|
committer | Mic Bowman | 2013-02-19 22:53:46 -0800 |
commit | 903b40b47e53cc131b57919e8a8a83db3cb36f96 (patch) | |
tree | dbba969abe346afa0ebc0539ebc9df9493b431f6 /OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs | |
parent | Deleted all AssemblyFileVersion directives (diff) | |
download | opensim-SC-903b40b47e53cc131b57919e8a8a83db3cb36f96.zip opensim-SC-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.gz opensim-SC-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.bz2 opensim-SC-903b40b47e53cc131b57919e8a8a83db3cb36f96.tar.xz |
Fix the JsonStore path set problem justincc found earlier today and
remove the deprecated TestPath functions.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs | 28 |
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; |