The next version will contain ctypes (available in SpiderMonkey 1.8.5)
which makes it possible to call foreign functions in other DLL's.
Is it possible to use SpiderMonkey in FreePascal?
Franky
Actually it looks like there is at least a partial implementation of
this already...
http://code.google.com/p/fpcjs/
This links to the .pas file which defines the class objects, I realise
that it is object pascal but does it look at all like what you would
anticipate was helpful to making a .dll that could be used GLUEscript
to directly provide JavaScript objects/functions?
http://fpcjs.googlecode.com/svn/trunk/src/fpcjs.pas
Paul
Hi,
With the "gluified" libraries like gd etc.. when glue uses "require" as in
var gd = require("gd");
What is it expecting to find exported from say bin/modules/glue_gd.dll
FreePascal can create most data structures that C or C++ can.
Or is this too complex to be spending time trying to explore perhaps?
Paul
The interface Poco::Script::JavaScript::SpiderMonkey::ExtensionInterface
must be implemented by all glues.
These are the virtual methods:
virtual Object initialize(Object& obj) = 0;
virtual std::string id() const = 0;
id() returns the name of the glue. For example: gd will be returned by
glue_gd.dll
initialize is used to initialize all JavaScript classes. The object that
is passed is the module object which is returned by the "require" method.
GLUEscript uses the dynamic class loader from the POCO framework.
I'll explore that when I can and see if anything is realistiacally
workable from FreePascal.
Paul
> --
> You received this message because you are subscribed to the Google Groups
> "GLUEscript" group.
> To post to this group, send email to glues...@googlegroups.com.
> To unsubscribe from this group, send email to
> gluescript+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gluescript?hl=en.
>
>