roadlabs / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Use public declarations instead of callbacks (cython) #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently cython functions that are callable from C require writing lots of 
code. We could get rid of all the types defined in clienthandler.h and 
clienthandler.pxd if we used 'public' declarations, that way cython callbacks 
would be visible in C code automatically with no additional code, it would be 
so much easier to port CEF api.

'public' declarations:
http://docs.cython.org/src/userguide/external_C_code.html#public-declarations

Version 0.16 of Cython generates an error when you try to use 'public' or 'api' 
declarations. I've also had some other problems when I tried to use it, but 
these issues have been resolved, and we should evaluate using `public` 
declarations again, it will simplify code much.

New 0.17 version will be released soon, a few days ago there was released 0.17 
beta 3 rc:

https://groups.google.com/forum/?fromgroups=#!topic/cython-users/Tutevv3cSVc

To quote:
> This is our first and hopefully last release candidate for 0.17

Original issue reported on code.google.com by czarek.t...@gmail.com on 27 Aug 2012 at 8:26

GoogleCodeExporter commented 9 years ago
In Cython 0.16 when we tried to use 'public' there was this error:
'''Function declared public or api may not have private types'''

Original comment by czarek.t...@gmail.com on 28 Aug 2012 at 5:06

GoogleCodeExporter commented 9 years ago
RequestHandler is already using 'public' declarations to call Cython functions 
from C code. Still need to migrate other handlers: KeyboardHandler, LoadHandler 
and V8ContentHandler.

Original comment by czarek.t...@gmail.com on 28 Aug 2012 at 7:46

GoogleCodeExporter commented 9 years ago
Currently there is no need to migrate old handlers, they work fine. New 
handlers will be from now on implemented using 'public' declarations.

Original comment by czarek.t...@gmail.com on 29 Aug 2012 at 6:00