source: typemap

release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file was 39e81f7, checked in by Nelson Elhage <nelhage@mit.edu>, 8 years ago
Return unicode strings to perl. Define a new typedef, 'utf8', in perlglue.xs, and use a typemap that indicates that values of type utf8* should be returned to perl as Unicode strings. There is no good reason that get_{data,config}_dir should not also return unicode, except that making them do so crashes my barnowl in some extremely strange and hard-to-debug manner.
  • Property mode set to 100644
File size: 141 bytes
Line 
1TYPEMAP
2utf8 *         T_PV_UTF8
3const utf8 *   T_PV_UTF8
4
5OUTPUT
6T_PV_UTF8
7        sv_setpv((SV*)$arg, $var);
8        SvUTF8_on((SV*)$arg);
Note: See TracBrowser for help on using the repository browser.