Esempio n. 1
0
        private static MultibyteCodec GetCodec(object self, CodeContext context) {
            MultibyteCodec codec = PythonOps.GetBoundAttr(context, self, "codec") as MultibyteCodec;
            if (codec == null) {
                throw PythonOps.TypeError("codec is unexpected type");
            }

            return codec;
        }
Esempio n. 2
0
 public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")]string errors) {
     _codec = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }
Esempio n. 3
0
 public MultibyteIncrementalEncoder(CodeContext context) {
     _codec = GetCodec(this, context);
 }
Esempio n. 4
0
 public MultibyteStreamReader(CodeContext context, object stream, [DefaultParameterValue("strict")] string errors)
 {
     _codec  = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }
Esempio n. 5
0
 public MultibyteIncrementalEncoder(CodeContext context)
 {
     _codec = GetCodec(this, context);
 }
Esempio n. 6
0
 public MultibyteStreamReader(CodeContext context, object stream, string errors = "strict")
 {
     _codec  = GetCodec(this, context);
     _stream = stream;
     _errors = errors;
 }