[pypy-commit] cffi default: Comment

arigo noreply at buildbot.pypy.org
Tue May 26 14:00:45 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2105:2bf339d28c77
Date: 2015-05-26 14:01 +0200
http://bitbucket.org/cffi/cffi/changeset/2bf339d28c77/

Log:	Comment

diff --git a/c/lib_obj.c b/c/lib_obj.c
--- a/c/lib_obj.c
+++ b/c/lib_obj.c
@@ -489,6 +489,11 @@
     }
     else {
         struct CPyExtFunc_s *exf = _cpyextfunc_get(x);
+        /* XXX the exf case is strange: typing ffi.addressof(lib, 'func')
+           just returns the same thing as lib.func, so there is  no point
+           right now.  Maybe it should instead return a regular <cdata>
+           object of a function-pointer ctype, which would point to a
+           yet-to-be-defined function from the generated .c code. */
         if (exf != NULL  ||  /* an OP_CPYTHON_BLTN: '&func' is 'func' in C */
             ((CData_Check(x) &&  /* or, a constant functionptr cdata: same */
               (((CDataObject *)x)->c_type->ct_flags & CT_FUNCTIONPTR) != 0))) {


More information about the pypy-commit mailing list