[C++-sig] [c++-sig] python std::string assignment

Stefan Seefeld seefeld at sympatico.ca
Fri Oct 17 12:54:28 CEST 2008

Furkan Kuru wrote:
> Hello,
> I have exported a struct containing a std::string field and used it 
> one of my py files.
> I used same py and pyd file in another operating system (vista).
> It just stuck without giving any errors.
> I figured out that the std::string field gets a limited space (as it 
> should do)
> but does not increase it when initialized or assigned with longer 
> sequence of characters.
> Is it a "quick and good" solution to write a wrapper for std::string 
> and set its reserved space a high number ( reserve(128); ) 
> or
> export overloaded = operator to python side?

Sorry, but it isn't clear at all what problem you are seeing. Can you 
provide a concise description of what behavior you expect, and what you 
actually get (together with a minimal but complete code snippet) ? In 
that case someone on this list may be able to help you.



      ...ich hab' noch einen Koffer in Berlin...

More information about the Cplusplus-sig mailing list