3 PerlUtil - a C++ utility class for Perl/Symbian
8 USERINCLUDE \symbian\perl\x.y.z\include
12 #include "PerlUtil.h" // includes also EXTERN.h and perl.h
14 // Static methods for moving between Perl strings (SvPV)
15 // and Symbian strings (HBufC and TDes).
17 static SV* newSvPVfromTDesC8(const TDesC8& aDes);
18 static void setSvPVfromTDesC8(SV* sv, const TDesC8& aDes);
19 static HBufC8* newHBufC8fromSvPV(SV* sv);
20 static void setTDes8fromSvPV(TDes8* aDes8, SV* sv);
22 static SV* newSvPVfromTDesC16(const TDesC16& aDes);
23 static void setSvPVfromTDesC16(SV* sv, const TDesC16& aDes);
24 static HBufC16* newHBufC16fromSvPV(SV* sv);
25 static void setTDes16fromSvPV(TDes16* aDes16, SV* sv);
27 static HBufC8* newHBufC8fromPVn(const U8* s, STRLEN n);
28 static void setTDes8fromPVn(TDes8* aDes8, const U8* s, STRLEN n);
29 static HBufC16* newHBufC16fromPVn(const U8* s, STRLEN n, bool utf8);
30 static void setTDes16fromPVn(TDes16* aDes16, const U8* s, STRLEN n);
33 const U8* s = (const U8 *)"foo";
34 HBufC16* b = PerlUtil::newHBufC16fromPVn(s, 3, 0);
35 someCallWithConstTDesCRefArgument(*b);