Notre bibliothèque C++ fonctionne très bien avec Python2.4 en utilisant Swig, retournant un char * C++ à une chaîne python. Mais cette solution problème frappé dans Python3.0, l'erreur est:Le char * de C++ par swig a un problème avec Python 3.0
Exception = (, UnicodeDecodeError ('utf8', b "\ XB6 \ x9d \ xa .....", 0, 1, « octet de code inattendu «)
Notre définition est comme (fonctionne bien en Python 2.4):.
void cGetPubModulus(
void* pSslRsa,
char* cMod,
int* nLen);
%include "cstring.i"
%cstring_output_withsize(char* cMod, int* nLen);
rasade suspect fait un Bytes-> conversion Str automatiquement python2.4 il peut être implicite mais Python3.0