private void EnsureDict() { if (_dict == null) { Interlocked.CompareExchange <PythonDictionary>(ref _dict, PythonDictionary.MakeSymbolDictionary(), null); } }
private PythonDictionary EnsureDict() { if (_dict == null) { _dict = PythonDictionary.MakeSymbolDictionary(); } return(_dict); }
public static object FastSetDictionaryValue(ref PythonDictionary dict, string name, object value) { if (dict == null) { Interlocked.CompareExchange(ref dict, PythonDictionary.MakeSymbolDictionary(), null); } return(dict[name] = value); }
public OldInstance(CodeContext /*!*/ context, OldClass @class, PythonDictionary dict) { _class = @class; _dict = dict ?? PythonDictionary.MakeSymbolDictionary(); if (_class.HasFinalizer) { // class defines finalizer, we get it automatically. AddFinalizer(context); } }