Up Prev Next
From: mpeppler at itf dot ch (Michael Peppler)
Subject: Re: Problems with writing text
Date: Jan 25 1996 11:34AM
From: email@example.com (Paul Marquess)
> From: mpeppler@itf.CH (Michael Peppler)
> > What happens is this:
> > When sybperl calls dbwritetext() internally, it asks the Perl
> > interpreter for the size of the data buffer that it must write. This
> > 'size' variable returns the internally allocated size, not necessarilly
> > the actual length of the buffer, so when a variable holding a text
> > buffer shrinks the &dbwritetext() call doesn't see it.
> Err, are you sure that is the problem?
> Here is the dbwritetext xsub.
I feel a little stupid :-)
I was sure that I tried both the perl4 and perl5 versions, and that I
had the same results. It turns out, as you correctly point out, that
this bug does not exist in perl5 (sybperl 2)...
With sybperl 1.x and perl 4 it seems to be necessary to undefine the
variable to make sure that the correct length is passed to
dbwritetext(). In sybperl 2 /perl 5 this is handled correctly.
Sorry for the confusion.