diff options
author | portix <none@none> | 2012-06-03 23:44:32 +0200 |
---|---|---|
committer | portix <none@none> | 2012-06-03 23:44:32 +0200 |
commit | 80ac1b30b111ae528f9e529410f0d45dc8076410 (patch) | |
tree | 193026ce0362ebd88d321796f010c0fdd19d1e8c /src/js.c | |
parent | 64321ca7aac7c02b2b2c1da6c3aca601799270d2 (diff) | |
download | dwb-80ac1b30b111ae528f9e529410f0d45dc8076410.zip |
New function system.spawnSync
Diffstat (limited to 'src/js.c')
-rw-r--r-- | src/js.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -39,6 +39,13 @@ js_set_object_property(JSContextRef ctx, JSObjectRef arg, const char *name, cons JSObjectSetProperty(ctx, arg, js_key, js_value, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly, exc); JSStringRelease(js_key); } +void +js_set_object_number_property(JSContextRef ctx, JSObjectRef arg, const char *name, gdouble value, JSValueRef *exc) { + JSStringRef js_key = JSStringCreateWithUTF8CString(name); + JSValueRef js_value = JSValueMakeNumber(ctx, value); + JSObjectSetProperty(ctx, arg, js_key, js_value, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly, exc); + JSStringRelease(js_key); +} /* js_get_object_property {{{*/ JSObjectRef js_get_object_property(JSContextRef ctx, JSObjectRef arg, const char *name) { |