From: Marcelo M. <mar...@us...> - 2005-12-30 10:52:32
|
Update of /cvsroot/swig/SWIG/Lib/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30615/Lib/python Modified Files: jstring.i Log Message: add jstring.i for ruby Index: jstring.i =================================================================== RCS file: /cvsroot/swig/SWIG/Lib/python/jstring.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jstring.i 30 Dec 2005 08:54:56 -0000 1.1 --- jstring.i 30 Dec 2005 10:51:35 -0000 1.2 *************** *** 43,58 **** %fragment(SWIG_From_frag(jstring),"header") { SWIGINTERNINLINE PyObject * ! SWIG_From(jstring)(jstring js) { ! if (!js) { return SWIG_Py_Void(); } if (sizeof(Py_UNICODE) == sizeof(jchar)) { ! return PyUnicode_FromUnicode((const Py_UNICODE *) JvGetStringChars(js), ! js->length()); } else { ! int len = js->length(); Py_UNICODE pchars[len]; ! jchar *jchars = JvGetStringChars(js); for (int i = 0; i < len; i++) { --- 43,58 ---- %fragment(SWIG_From_frag(jstring),"header") { SWIGINTERNINLINE PyObject * ! SWIG_From(jstring)(jstring val) { ! if (!val) { return SWIG_Py_Void(); } if (sizeof(Py_UNICODE) == sizeof(jchar)) { ! return PyUnicode_FromUnicode((const Py_UNICODE *) JvGetStringChars(val), ! JvGetStringUTFLength(val)); } else { ! int len = JvGetStringUTFLength(val); Py_UNICODE pchars[len]; ! jchar *jchars = JvGetStringChars(val); for (int i = 0; i < len; i++) { |