Example #1
0
 private void EnsureDict()
 {
     if (_dict == null)
     {
         Interlocked.CompareExchange <PythonDictionary>(ref _dict, PythonDictionary.MakeSymbolDictionary(), null);
     }
 }
Example #2
0
 private PythonDictionary EnsureDict()
 {
     if (_dict == null)
     {
         _dict = PythonDictionary.MakeSymbolDictionary();
     }
     return(_dict);
 }
Example #3
0
        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);
        }
Example #4
0
 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);
     }
 }