Ouch! That is a lot of code performing magic.
node-expat is faced with the same problem. Instead of building a JS
object extending library like you did here, I'm thinking about
require("events") and subclassing that... oh wait, C++ needs the
superclass at compile time.
Is there really no simple solution to this silly API breakage?
Astro
It's the same technique: look up the require function in the global
context and call it.
C++ modules aren't really for doing complex things that need to be
strewn across multiple modules. Just get your binding done as quick
as possible, get out of there, and then wrap it in JS for all the
fancy stuff.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>