[prev in list] [next in list] [prev in thread] [next in thread]
List: python-cpp-sig
Subject: Re: [C++-sig] Creating a unicode instrance from utf-8 encoded string
From: "Ralf W. Grosse-Kunstleve" <rwgk () yahoo ! com>
Date: 2011-02-21 16:29:29
Message-ID: 457487.11242.qm () web111412 ! mail ! gq1 ! yahoo ! com
[Download RAW message or body]
> result.append(PyUnicode_FromString(i->c_str()));
try
result.append(object(handle<>(PyUnicode_FromString(i->c_str()))));
The handle<> is a way to tell Boost.Python if you own the reference or if it is
borrowed (among other things). The
suggested code assumes you own the reference.
Ralf
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic