Beispiel #1
0
        internal CPythonConstant GetConstant(CPythonType type)
        {
            CPythonConstant constant;

            if (!_constants.TryGetValue(type, out constant))
            {
                _constants[type] = constant = new CPythonConstant(type);
            }
            return(constant);
        }
Beispiel #2
0
 internal CPythonConstant GetConstant(IPythonType type) {
     CPythonConstant constant;
     if (_constants.TryGetValue(type, out constant)) {
         return constant;
     }
     _constants[type] = constant = new CPythonConstant(type);
     return constant;
 }
Beispiel #3
0
 internal CPythonConstant GetConstant(IPythonType type) {
     CPythonConstant constant;
     if (_constants.TryGetValue(type, out constant) ||
         (constant = _inner?.GetConstant(type)) != null) {
         return constant;
     }
     _constants[type] = constant = new CPythonConstant(type);
     return constant;
 }