So cppyy isn't production ready yet? If C++ exceptions can cause the process to crash that's very dangerous in production systems. Can we warn about this in the documentation. I think that people should know about this before investing time with it.
2015-01-20 19:03 GMT+02:00 <[email protected]>: > Hi, > > I tried to pass a bytearray and that's also not currently supported. >> > > no, it really expects an std::string object to be passed through an > std::string*, as Amaury advised. Any other type would require the creation > of a temporary. (A C++ string is not a byte array. Typically, it carries a > length data member and a pointer to what is a byte array. Further, for > short strings, those data members can be used as the actual payload.) > > Any clue about what should I do with the exception? It definitely >> shouldn't >> crash the process. I need it to raise a python exception instead. >> > > Right, which is done on the CPython side. Haven't gotten around to > implement > the same on the PyPy side. Isn't hard, but takes time. (There's a separate > issue for the cling backend, where we have yet to move to MCJit, which is > needed to support C++ exceptions through LLVM JIT-ted code.) > > Likewise, returning out-parameters in a tuple is a nice pythonization that > is on the TODO-list (which is long). Lacking time, again. > > Of course, this can be fixed on the python side also, by replacing the > bound > function with one that creates a temporary s = std.string(), calls the > original function, then returns an str(s). > > Best regards, > Wim > -- > [email protected] -- +1 (510) 486 6411 -- www.lavrijsen.net >
_______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev
