private PyUnicode_FromUnicode ( string s, int size ) : IntPtr | ||
s | string | |
size | int | |
리턴 | IntPtr |
private static IntPtr FromString(string s) { IntPtr val = Runtime.PyUnicode_FromUnicode(s, s.Length); PythonException.ThrowIfIsNull(val); return(val); }
/// <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(); } }
/// <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(); }
/// <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); }