Beispiel #1
0
 public override FFIFunctionPointer GetFunctionPointer(string className, string name, List<ProtoCore.Type> argTypes, ProtoCore.Type returnType)
 {
     List<FFIFunctionPointer> pointers;
     if (functionPointers.ContainsKey(name))
     {
         pointers = functionPointers[name];
         //todo this needs validating types. else this would be an overload
         return pointers[0];
     }
     else
     {
         pointers = new List<FFIFunctionPointer>();
         FFIFunctionPointer f = new PInvokeFunctionPointer(this, name, argTypes, returnType);
         pointers.Add(f);
         functionPointers[name] = pointers;
         return f;
     }
 }
Beispiel #2
0
        public override FFIFunctionPointer GetFunctionPointer(string className, string name, List <ProtoCore.Type> argTypes, ProtoCore.Type returnType)
        {
            List <FFIFunctionPointer> pointers;

            if (functionPointers.ContainsKey(name))
            {
                pointers = functionPointers[name];
                //todo this needs validating types. else this would be an overload
                return(pointers[0]);
            }
            else
            {
                pointers = new List <FFIFunctionPointer>();
                FFIFunctionPointer f = new PInvokeFunctionPointer(this, name, argTypes, returnType);
                pointers.Add(f);
                functionPointers[name] = pointers;
                return(f);
            }
        }