0
我有一個C++函數,它將一個std :: string作爲參數,並將一個python對象作爲緩衝區。我以爲我可以直接通過緩衝和升壓的Python會自動轉換爲字符串,但是它沒有:boost python -python buffer to C++ std :: string
Boost.Python.ArgumentError: Python argument types in
mod.decrypt(buffer)
did not match C++ signature:
decrypt(std::string string_to_decrypt)
是否有必要寫這個轉換器?我認爲這會隱含轉換。感謝您的任何建議。