lucy-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [lucy-issues] [jira] [Commented] (CLOWNFISH-66) Python-specific CFC
Date Wed, 24 Feb 2016 02:58:18 GMT


ASF GitHub Bot commented on CLOWNFISH-66:

GitHub user rectang opened a pull request:

    CLOWNFISH-66 Py glue part 1, v2

    Glue code for the Python host.
    * Refcounting
    * Error handling
    * Host conversion for basic types
    * Argument conversion
    * Callbacks for overridden methods
    Changes from v1:
    * Simplified error handling per Nick's suggestions.
    * Rebased on top of current master.

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

    $ git pull CLOWNFISH-66-py-glue1-v2

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

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

    This closes #58
commit 7910ca91a9005798ae8d6537f5fb55e01d07a17a
Author: Marvin Humphrey <>
Date:   2016-01-21T00:25:02Z

    Use Python refcounting.
    In our Python bindings, Clownfish objects are Python objects, so use
    Python's refcounting.

commit eccf1b645bb9042825d84bbe4db4041ad63e2fc1
Author: Marvin Humphrey <>
Date:   2016-01-22T23:40:08Z

    Implement Clownfish exceptions using `longjmp`.
    Though Python uses exceptions, executing exceptions from the Python C
    API requires setting thread-local error information and indicating an
    error condition to the Python interpreter by returning NULL from the
    glue function.  So Clownfish has to have its own independent exception

commit 9162199c26ab869bff1133d517388899468b4170
Author: Marvin Humphrey <>
Date:   2016-01-23T00:51:01Z

    Re-raise Python exceptions from Clownfish.
    Add a function which takes the Python `sys.exc_info`, wraps it in a
    Clownfish Err, and THROWs it.

commit 991e4a576ab7edfd96e285c8493c3bdbd1794d6d
Author: Marvin Humphrey <>
Date:   2016-01-23T01:14:30Z

    Add ParseTuple-compatible converters for numerics.
    Add some conversion functions which conform to the API specified by
    Python's ParseTuple C functionality.

commit 2aab6efe2533e6e5b526cd6b408e24443c6d0f61
Author: Marvin Humphrey <>
Date:   2016-01-26T00:39:02Z

    Add wrappers for `To_Host` in Python bindings.
    Add NULL-safe wrappers, one of which is refcount neutral.

commit 3e4952ca641308a8704fa41c51786dace4389ce7
Author: Marvin Humphrey <>
Date:   2016-01-26T00:41:37Z

    `To_Host` for Python returns incref'd self.
    The default implementation for `To_Host` for Python just returns the
    result of calling INCREF on the invocant.

commit bebc75899ec1dbbbd040fbf6ff21b1b6c4b9be97
Author: Marvin Humphrey <>
Date:   2016-01-26T01:02:25Z

    To_Host for composite types to Python.
    Implement To_Host conversion for Hash -> Python dict and Vector ->
    Python list.

commit 5d3809ba960455a6695fcfece1063e7d91f23fac
Author: Marvin Humphrey <>
Date:   2016-01-26T01:26:40Z

    Implement scalar types To_Host for Python.
    - String  -> string
    - Blob    -> bytes
    - Boolean -> bool
    - Integer -> int
    - Float   -> float

commit 82d79df8bc4c57ff42922a60436425c078ae6731
Author: Marvin Humphrey <>
Date:   2016-01-27T01:24:22Z

    Add CF pound-includes in autogen Py module file.

commit 999b39f44d69744f08f86e5688a84d7ff0153cd8
Author: Marvin Humphrey <>
Date:   2016-01-27T01:42:39Z

    Add dummy py_obj_is_a implementation.

commit 99d6bc0fe89382c8492d97825fc03ca82eac051f
Author: Marvin Humphrey <>
Date:   2016-01-27T23:35:08Z

    Conversion routines from Python to Clownfish.

commit 8996f0f62d0e07ed3b0d14934041aeb9d71fa698
Author: Marvin Humphrey <>
Date:   2016-01-28T00:05:37Z

    Stub out callback-generating code for Python.

commit 2b65f36064ae0f733123a82202dc97f18a6dd325
Author: Marvin Humphrey <>
Date:   2016-01-28T00:43:55Z

    Add ParseTuple converters for composite types.
    Provide ParseTuple-compatible C functions which convert Python list to
    Clownfish Vector and Python dict to Clownfish Hash.

commit 9bbb13f48240d2365b02371bf9f9ce23c7e30c34
Author: Marvin Humphrey <>
Date:   2016-01-28T01:06:12Z

    Add dummy routine for fetching PyTypeObject.

commit 514827b7293471645b0d6a5d450ef7ad1177e79d
Author: Marvin Humphrey <>
Date:   2016-01-28T01:13:51Z

    ParseTuple routines for Obj, String.

commit bb7e880799d6bb0e4743d24fcacb630e04b2e32f
Author: Marvin Humphrey <>
Date:   2016-01-28T02:23:36Z

    Add helper routines for Python callbacks.
    The generated C code for calling back into Python from Clownfish when a
    method is overridden will require these helper functions for running the
    Python callable, converting return values, etc.

commit 02617ac057b70a2358233d9f65fb205123b308e1
Author: Marvin Humphrey <>
Date:   2016-01-28T03:14:25Z

    Generate OVERRIDEs for non-overrideable meths.
    Generate error-throwing OVERRIDE routines for methods which cannot be

commit 335b61fc0f35868d1cda0bb1bbd879c616df1ae3
Author: Marvin Humphrey <>
Date:   2016-01-28T03:24:32Z

    Gen OVERRIDE callbacks for Python.
    Generate the C functions which call back into Python from
    Clownfish-flavored C when a method is overridden.

commit 91622dbf97f1afb2a195609fd1bea2b703119211
Author: Marvin Humphrey <>
Date:   2016-02-19T03:31:30Z

    Prepare to trap errors in Python glue code.
    Add private macro `CFBIND_TRY` and supporting routines, in an effort to
    wrap Clownfish C routines and trap errors.  This will be used inside
    glue code for Python, setting `sys.exc_info` when something goes wrong.


> Python-specific CFC
> -------------------
>                 Key: CLOWNFISH-66
>                 URL:
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
> The current Python bindings for CFC are rudimentary -- they only run charmonizer and
bind to existing core functionality. The next step is to add code-gen of CPython glue code.

This message was sent by Atlassian JIRA

View raw message