aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorroot2013-03-03 22:50:20 +0100
committerroot2013-03-03 22:50:20 +0100
commit82ac1763fb147a889ee547d844c91102d231a37c (patch)
treeae10931d785b2c96e7798de33fd8f32e45e5b7c3 /OpenSim
parentExperimental - add void return support to modSendCommand (diff)
downloadopensim-SC-82ac1763fb147a889ee547d844c91102d231a37c.zip
opensim-SC-82ac1763fb147a889ee547d844c91102d231a37c.tar.gz
opensim-SC-82ac1763fb147a889ee547d844c91102d231a37c.tar.bz2
opensim-SC-82ac1763fb147a889ee547d844c91102d231a37c.tar.xz
Add support for void return type
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 8f34833..ee89f9d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
123 public void modInvokeN(string fname, params object[] parms) 123 public void modInvokeN(string fname, params object[] parms)
124 { 124 {
125 Type returntype = m_comms.LookupReturnType(fname); 125 Type returntype = m_comms.LookupReturnType(fname);
126 if (returntype != typeof(string)) 126 if (returntype != typeof(void))
127 MODError(String.Format("return type mismatch for {0}",fname)); 127 MODError(String.Format("return type mismatch for {0}",fname));
128 128
129 modInvoke(fname,parms); 129 modInvoke(fname,parms);
@@ -264,6 +264,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
264 if (result != null) 264 if (result != null)
265 return result; 265 return result;
266 266
267 Type returntype = m_comms.LookupReturnType(fname);
268 if (returntype == typeof(void))
269 return null;
270
267 MODError(String.Format("Invocation of {0} failed; null return value",fname)); 271 MODError(String.Format("Invocation of {0} failed; null return value",fname));
268 } 272 }
269 catch (Exception e) 273 catch (Exception e)