cginternals / libzeug

deprecated: C++ sanctuary for small but powerful and frequently required, stand alone features.
MIT License
16 stars 13 forks source link

Scriptzeug: Duktape as Javascript scripting backend #89

Closed lanice closed 9 years ago

lanice commented 9 years ago

This adds Duktape as Javascript scripting backend to Scriptzeug. Duktape is a more compact/lightweight alternative to V8. The two source files duktape.c and duktape.h are already included in the build, which removes the dependency of a big library like V8. ref #79 (Only tested on Ubuntu 14.04 x64 so far.)

mjendruk commented 9 years ago

Hi. First of all, it compiles and runs on OS X. However, when I run the scriptexample, I get this message in line 264:

Unknown type found: 8
Duktape stack dump:
ctx: top=4, stack=[{object_pointer:(0x7fff5fbfcd68),char:0,uchar:0,int:0,uint:0,long:0,ulong:0,longlong:0,ulonglong:0,float:0,double:0,bool:0,string:"",path:"",color:"#00000000",enum:"Choice1",array:[1,2,3]},{object_pointer:true,char:true,uchar:true,int:true,uint:true,long:true,ulong:true,longlong:true,ulonglong:true,float:true,double:true,bool:true,string:true,path:true,color:true,enum:true,array:true},"object_pointer",(0x7fff5fbfcd68)]

Is it intended?

cgcostume commented 9 years ago

:+1: works for me - thanks, no i do not need to build v8 in the next years (i hope) :smile: Please wait for :ship: from @mjendruk and @sbusch42.

Edit: I fixed the user name ;)

lanice commented 9 years ago

Thanks @mjendruk, the unwanted stack dump message should be fixed now.

mjendruk commented 9 years ago

please create an issue for the AbstractFunction memory leak. Then :shipit: