GitHub user nwellnhof opened a pull request:

    https://github.com/apache/lucy-clownfish/pull/36

    Rework Perl SV to Clownfish object conversion

    Consolidate the main code paths of the two previous conversion functions
    XSBind_sv_to_cfish_obj and XSBind_perl_to_cfish, removing subtle
    differences.
    
    One major effect is that hashrefs or arrayrefs passed to Clownfish
    functions taking a Clownfish::Obj will now be converted to a Hash or
    Vector, not a String.
    
    Only convert unblessed arrayrefs or hashrefs to Vector or Hash.
    Non-Clownfish objects will always be stringified.
    
    Remove support for passing AVs or HVs directly. Callers must pass a
    arrayref or hashref.
    
    Make XSBind_perl_to_cfish take a Class argument and guarantee that the
    returned object is of this class.
    
    Make XSBind_perl_to_cfish throw on undefined SVs. Add
    XSBind_perl_to_cfish_nullable that allows undef to NULL conversion.
    
    Rename XSBind_sv_to_cfish_obj to XSBind_perl_to_cfish_noinc.
    
    Remove XSBind_maybe_sv_to_cfish_obj.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nwellnhof/lucy-clownfish perl_to_cfish

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucy-clownfish/pull/36.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #36
    
----
commit 68678dab25812557f3ffe654ebf9d4b035aeb094
Author: Nick Wellnhofer <[email protected]>
Date:   2015-08-05T18:55:08Z

    Rework Perl SV to Clownfish object conversion
    
    Consolidate the main code paths of the two previous conversion functions
    XSBind_sv_to_cfish_obj and XSBind_perl_to_cfish, removing subtle
    differences.
    
    One major effect is that hashrefs or arrayrefs passed to Clownfish
    functions taking a Clownfish::Obj will now be converted to a Hash or
    Vector, not a String.
    
    Only convert unblessed arrayrefs or hashrefs to Vector or Hash.
    Non-Clownfish objects will always be stringified.
    
    Remove support for passing AVs or HVs directly. Callers must pass a
    arrayref or hashref.
    
    Make XSBind_perl_to_cfish take a Class argument and guarantee that the
    returned object is of this class.
    
    Make XSBind_perl_to_cfish throw on undefined SVs. Add
    XSBind_perl_to_cfish_nullable that allows undef to NULL conversion.
    
    Rename XSBind_sv_to_cfish_obj to XSBind_perl_to_cfish_noinc.
    
    Remove XSBind_maybe_sv_to_cfish_obj.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to