PyUnicode_FromUnicode() 개인적인 메소드

private PyUnicode_FromUnicode ( string s, int size ) : IntPtr
s string
size int
리턴 IntPtr
예제 #1
0
        private static IntPtr FromString(string s)
        {
            IntPtr val = Runtime.PyUnicode_FromUnicode(s, s.Length);

            PythonException.ThrowIfIsNull(val);
            return(val);
        }
예제 #2
0
 /// <summary>
 /// PyString Constructor
 /// </summary>
 /// <remarks>
 /// Creates a Python string from a managed string.
 /// </remarks>
 public PyString(string s)
 {
     obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
     if (obj == IntPtr.Zero)
     {
         throw new PythonException();
     }
 }
예제 #3
0
 /// <summary>
 /// PyString Constructor
 /// </summary>
 /// <remarks>
 /// Creates a Python string from a managed string.
 /// </remarks>
 public PyString(string s)
 {
     obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
     Runtime.CheckExceptionOccurred();
 }
예제 #4
0
 /// <summary>
 /// PyString Constructor
 /// </summary>
 /// <remarks>
 /// Creates a Python string from a managed string.
 /// </remarks>
 public PyString(string s)
 {
     obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
     PythonException.ThrowIfIsNull(obj);
 }