On Fri, May 13, 2011 at 7:24 AM, Jonathan Worthington
<[email protected]> wrote:
> Hi,
>
> The deprecated 't' parameter in NCI broke Zavolaj (the Perl 6 native call
> interface). This in turn broke various modules, including MiniDBI. Looking
> at:
>
> https://github.com/parrot/parrot/commit/75e2b4c94d602d3d7e8af4b679c325c8ec8d3fd9#src/nci/extra_thunks.nci
>
> It seems that the signatures for e.g. mysql database connection were
> removed, not updated! The deprecation notice doesn't provide anything that
> seems to help with our use case. Replacing t with S seems to lead to
> segfaults; a further look shows that seems not to be passing a C string or
> even the string buffer, but the STRING * pointer. None of the examples that
> use the 't' parameter have been updated.

The signatures were removed with the intent that they be replaced
latter with their equivalents as needed. All code that was exercised
by tests (pcre, pg) was updated. It is regrettable that we have so
much untested code being used as examples of NCI.

To update your code, I would recommend making use of
Parrot_str_to_cstring/Parrot_str_free_cstring. These can be accessed
from HLL code using the NCI interface.

> Seriously, what the hell? I'm all for improvements. I'm fine with
> deprecations if I'm given a clue what to do to get things wroking again. But
> a removal of a feature used by *Perl 6 database access* with no instructions
> or updated examples that I can find, or maybe not even an actual
> replacement? Please tell me I'm missing something obvious somewhere.... Or
> just revert the patch that removed it.

Some of the code that was updated did make use of the 't' signature
type. These updates usually followed the advice given above. pcre, for
example, would be useless if not for its ability to operate on
strings.

> Thanks,
>
> /jnthn
>
>
>
>
>
>
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to