fix nlua build with analyzers
This commit is contained in:
parent
e4cf5d2955
commit
b01ae4b757
|
@ -329,7 +329,7 @@ namespace NLua
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name = "chunk"></param>
|
/// <param name = "chunk"></param>
|
||||||
/// <param name = "name"></param>
|
/// <param name = "name"></param>
|
||||||
|
@ -357,7 +357,7 @@ namespace NLua
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name = "chunk"></param>
|
/// <param name = "chunk"></param>
|
||||||
/// <param name = "name"></param>
|
/// <param name = "name"></param>
|
||||||
|
@ -903,7 +903,7 @@ namespace NLua
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a numeric field of the table or userdata corresponding the the provided reference
|
/// Gets a numeric field of the table or userdata corresponding to the provided reference
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal object GetObject(int reference, object field)
|
internal object GetObject(int reference, object field)
|
||||||
{
|
{
|
||||||
|
@ -917,7 +917,7 @@ namespace NLua
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets a field of the table or userdata corresponding the the provided reference
|
/// Sets a field of the table or userdata corresponding to the provided reference
|
||||||
/// to the provided value
|
/// to the provided value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal void SetObject(int reference, string field, object val)
|
internal void SetObject(int reference, string field, object val)
|
||||||
|
@ -929,7 +929,7 @@ namespace NLua
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets a numeric field of the table or userdata corresponding the the provided reference
|
/// Sets a numeric field of the table or userdata corresponding to the provided reference
|
||||||
/// to the provided value
|
/// to the provided value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal void SetObject(int reference, object field, object val)
|
internal void SetObject(int reference, object field, object val)
|
||||||
|
|
|
@ -45,13 +45,13 @@ namespace NLua
|
||||||
// local function index(obj, name)
|
// local function index(obj, name)
|
||||||
// local meta = getmetatable(obj)
|
// local meta = getmetatable(obj)
|
||||||
// local cached = meta.cache[name]
|
// local cached = meta.cache[name]
|
||||||
|
|
||||||
// if cached ~= nil then
|
// if cached ~= nil then
|
||||||
// if cached == fakenil then
|
// if cached == fakenil then
|
||||||
// return nil
|
// return nil
|
||||||
// end
|
// end
|
||||||
// return cached
|
// return cached
|
||||||
|
|
||||||
// else
|
// else
|
||||||
// local value, isCached = get_object_member(obj, name)
|
// local value, isCached = get_object_member(obj, name)
|
||||||
// if isCached then
|
// if isCached then
|
||||||
|
@ -64,7 +64,7 @@ namespace NLua
|
||||||
// return value
|
// return value
|
||||||
// end
|
// end
|
||||||
// end
|
// end
|
||||||
|
|
||||||
// return index";
|
// return index";
|
||||||
|
|
||||||
public MetaFunctions(ObjectTranslator translator)
|
public MetaFunctions(ObjectTranslator translator)
|
||||||
|
@ -306,8 +306,8 @@ namespace NLua
|
||||||
var objType = obj.GetType();
|
var objType = obj.GetType();
|
||||||
var proxyType = new ProxyType(objType);
|
var proxyType = new ProxyType(objType);
|
||||||
|
|
||||||
// Handle the most common case, looking up the method by name.
|
// Handle the most common case, looking up the method by name.
|
||||||
// CP: This will fail when using indexers and attempting to get a value with the same name as a property of the object,
|
// CP: This will fail when using indexers and attempting to get a value with the same name as a property of the object,
|
||||||
// ie: xmlelement['item'] <- item is a property of xmlelement
|
// ie: xmlelement['item'] <- item is a property of xmlelement
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(methodName) && IsMemberPresent(proxyType, methodName))
|
if (!string.IsNullOrEmpty(methodName) && IsMemberPresent(proxyType, methodName))
|
||||||
|
@ -990,7 +990,7 @@ namespace NLua
|
||||||
var args = setter.GetParameters();
|
var args = setter.GetParameters();
|
||||||
var valueType = args[1].ParameterType;
|
var valueType = args[1].ParameterType;
|
||||||
|
|
||||||
// The new value the user specified
|
// The new value the user specified
|
||||||
var val = _translator.GetAsType(luaState, 3, valueType);
|
var val = _translator.GetAsType(luaState, 3, valueType);
|
||||||
var indexType = args[0].ParameterType;
|
var indexType = args[0].ParameterType;
|
||||||
var index = _translator.GetAsType(luaState, 2, indexType);
|
var index = _translator.GetAsType(luaState, 2, indexType);
|
||||||
|
@ -1028,7 +1028,7 @@ namespace NLua
|
||||||
{
|
{
|
||||||
detailMessage = null; // No error yet
|
detailMessage = null; // No error yet
|
||||||
|
|
||||||
// If not already a string just return - we don't want to call tostring - which has the side effect of
|
// If not already a string just return - we don't want to call tostring - which has the side effect of
|
||||||
// changing the lua typecode to string
|
// changing the lua typecode to string
|
||||||
// Note: We don't use isstring because the standard lua C isstring considers either strings or numbers to
|
// Note: We don't use isstring because the standard lua C isstring considers either strings or numbers to
|
||||||
// be true for isstring.
|
// be true for isstring.
|
||||||
|
@ -1052,7 +1052,7 @@ namespace NLua
|
||||||
{
|
{
|
||||||
var members = targetType.GetMember(fieldName, bindingType | BindingFlags.Public);
|
var members = targetType.GetMember(fieldName, bindingType | BindingFlags.Public);
|
||||||
|
|
||||||
if (members.Length <= 0)
|
if (members.Length is 0)
|
||||||
{
|
{
|
||||||
detailMessage = "field or property '" + fieldName + "' does not exist";
|
detailMessage = "field or property '" + fieldName + "' does not exist";
|
||||||
return false;
|
return false;
|
||||||
|
@ -1439,7 +1439,7 @@ namespace NLua
|
||||||
|
|
||||||
foreach (var currentNetParam in paramInfo)
|
foreach (var currentNetParam in paramInfo)
|
||||||
{
|
{
|
||||||
if (!currentNetParam.IsIn && currentNetParam.IsOut) // Skips out params
|
if (!currentNetParam.IsIn && currentNetParam.IsOut) // Skips out params
|
||||||
{
|
{
|
||||||
paramList.Add(null);
|
paramList.Add(null);
|
||||||
outList.Add(paramList.Count - 1);
|
outList.Add(paramList.Count - 1);
|
||||||
|
|
Loading…
Reference in New Issue