public object Call(CodeContext/*!*/ context, [ParamDictionary]IDictionary<object, object> dict, params object[] args) { IDictionary<object, object> finalDict; if (_keywordArgs != null) { PythonDictionary pd = new PythonDictionary(); pd.update(context, _keywordArgs); pd.update(context, dict); finalDict = pd; } else { finalDict = dict; } EnsureDictSplatSite(); return _dictSite.Target(_dictSite, context, _function, ArrayUtils.AppendRange(_args, args), finalDict); }
UpdateMethodTableObj(PythonDictionary methodTable, object potentialMethodSource) { if (Builtin.hasattr(this.scratchContext, potentialMethodSource, "_dispatcher")) { PythonDictionary methodSource = (PythonDictionary)Builtin.getattr( this.scratchContext, Builtin.getattr( this.scratchContext, potentialMethodSource, "_dispatcher"), "table"); methodTable.update(this.scratchContext, methodSource); } this.Store(potentialMethodSource); return potentialMethodSource; }
UpdateMethodTableObj(PythonDictionary methodTable, object potentialMethodSource) { if (Builtin.hasattr(this.scratchContext, potentialMethodSource, "_dispatcher")) { PythonDictionary methodSource = (PythonDictionary)Builtin.getattr( this.scratchContext, Builtin.getattr( this.scratchContext, potentialMethodSource, "_dispatcher"), "table"); methodTable.update(this.scratchContext, methodSource); } this.Store(potentialMethodSource); return(potentialMethodSource); }
PyDict_Update(IntPtr dstPtr, IntPtr srcPtr) { try { PythonDictionary dst = (PythonDictionary)this.Retrieve(dstPtr); dst.update(this.scratchContext, this.Retrieve(srcPtr)); return(0); } catch (Exception e) { this.LastException = e; return(-1); } }