[Xapian-devel] GSoC xapian node binding

Marius Tibeica mtibeica at gmail.com
Thu Jun 7 11:09:48 BST 2012


About the changes of Emit for node 0.6

0.6 - We need a .js wrapper to extent the prototype of the objects which
emit events
0.4 - The prototype of EventEmitter is inherited in C++ :
t->Inherit(EventEmitter::constructor_template);
possible fix - we could just only include the C++ inherit on node 0.4 with
a define and the js prototype only on node 0.6+

0.6 - C++ emitting objects are derived from ObjectWrap
0.4 - C++ emitting objects are derived from EventEmitter
possible fix - class XapWrapEe<T> : public ObjectWrap on node 0.6+
and XapWrapEe<T> : public EventEmitter on node 0.4

0.6 - C++ must get the "emit" function and then call it
0.4 - C++ just calls Emit
possible fix - make XapWrapEe have an emit method which will be different
for the different node versions


Since we only have one emit in the existing binding, we decided to change
that to a callback as events are not necessarily required, so these changes
are not required yet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20120607/5c83d12d/attachment.htm>


More information about the Xapian-devel mailing list