Allow built-in objects to be created with new X()

This commit is contained in:
Gordon Williams 2018-11-23 12:28:30 +00:00
parent 04073feced
commit b0ea012c82
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
Add E.dumpFragmentation to show memory fragmentation (only for debug builds)
Fix parsing of dates from before 1970
nRF52: Fix some regressions in requestDevice (flagged up by asserts in debug build)
Allow built-in objects to be created with `new X()`
2v00 : Allow changeInterval with large (>32 bit) intervals (fix #1438)
changeInterval now changes the interval immediately when it's called inside the interval it is changing (fix #1440)

View File

@ -244,7 +244,7 @@ for className in classes:
if not className in constructors:
jsondatas.append({
"type":"constructor", "class": className, "name": className,
"generate_full" : "jsvNewWithFlags(JSV_OBJECT)",
"generate_full" : "NULL", # return undefined means 'new X' uses the object that was returned, which is correct
"filename" : "jswrapper.c",
"return" : [ "JsVar", "" ]
});