> On Thu, Dec 21, 2000 at 05:14:38PM +0000, Dr S N Henson wrote:
> > One of the problems with swig is that it doesn't handle buffers which
> > can contain embedded nulls automatically (these occur *everywhere* in
> > OpenSSL) and this usually requires some low level stuff in the relevant
> > scripting language.
Counted-length strings. (Visual) Basic got some thing right. :)
We created a (void*,int) structure and pass those around -- by value. This
works
pretty well, a single SWIG typemap catches conversion of these binary buffers
to/from scripting language strings. One-line wrapper functions around OpenSSL
often help.
(Actually, we're using C++ so we have "ownership" on the pointer, so we know
if/when
to free it. It's not unlike auto_ptr<void*> for those who know it.)
We'd be glad to share this with someone working on open-source solutions like
this.
/r$
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]