diff options
author | Armin Rigo <arigo@tunes.org> | 2015-11-13 15:34:40 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2015-11-13 15:34:40 +0100 |
commit | 2eb8e49216766fa09da37e7500908b4ac30440a5 (patch) | |
tree | 79e719ea4bc4b37e16e77cb803ad4d145c916cb2 /c/lib_obj.c | |
parent | beda97da0fef567b2aa2dea22299352750c109ae (diff) | |
download | cffi-2eb8e49216766fa09da37e7500908b4ac30440a5.tar.gz |
tweak tweak tweak until we can at least read the function pointer out of
the 'lib' object
Diffstat (limited to 'c/lib_obj.c')
-rw-r--r-- | c/lib_obj.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/c/lib_obj.c b/c/lib_obj.c index 8ae20af..950b439 100644 --- a/c/lib_obj.c +++ b/c/lib_obj.c @@ -364,6 +364,16 @@ static PyObject *lib_build_and_cache_attr(LibObject *lib, PyObject *name, break; } + case _CFFI_OP_CALL_PYTHON: + /* for reading 'lib.bar' where bar is declared with CFFI_CALL_PYTHON */ + ct = realize_c_type(types_builder, types_builder->ctx.types, + _CFFI_GETARG(g->type_op)); + if (ct == NULL) + return NULL; + x = convert_to_object(g->address, ct); + Py_DECREF(ct); + break; + default: PyErr_Format(PyExc_NotImplementedError, "in lib_build_attr: op=%d", (int)_CFFI_GETOP(g->type_op)); |