From: Konrad Meyer Date: 2007-09-24T08:30:07+09:00 Subject: Re: [ANN] CplusRuby - Gluing C and Ruby --nextPart2647755.kQulo5Tmft Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Paul Brannan: > :char_p =3D> { > :default =3D> '""', > :ctype =3D> 'char* %s', > :ruby2c =3D> 'StringValuePtr(%s)', > :c2ruby =3D> 'rb_str_new2(%s)'} >=20 > I think you'll want to store either a copy of the string or a reference > to the string object (which would need to be marked). If you don't, the > string could be destroyed before the containing struct, which would > leave you with a dangling pointer. >=20 > Paul Yes, I believe that's the problem I ran into. =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart2647755.kQulo5Tmft Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG9vb6CHB0oCiR2cwRAs2sAJwN0CpmhmDI2HiaQqqT4UZ5Gi3w8gCgrpHz 2T/+aWIC/h2edh8CBjaiMr8= =IId5 -----END PGP SIGNATURE----- --nextPart2647755.kQulo5Tmft--