diff options
author | portix <none@none> | 2012-04-17 01:53:50 +0200 |
---|---|---|
committer | portix <none@none> | 2012-04-17 01:53:50 +0200 |
commit | 724b3b4812f8d19eb684667e7ea5842a82280fc8 (patch) | |
tree | 534e657caaaa84bbdde544550da9dc962a0efd06 /src/js.c | |
parent | 4202f035d34004b9f555b4066e18ad16ec17b924 (diff) | |
download | dwb-724b3b4812f8d19eb684667e7ea5842a82280fc8.zip |
Basic setter/getter functions in scripts
--HG--
branch : scripts
Diffstat (limited to 'src/js.c')
-rw-r--r-- | src/js.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -40,6 +40,13 @@ js_get_object_property(JSContextRef ctx, JSObjectRef arg, const char *name) { }/*}}}*/ +JSValueRef +js_char_to_value(JSContextRef ctx, const char *text) { + JSStringRef string = JSStringCreateWithUTF8CString(text); + JSValueRef ret = JSValueMakeString(ctx, string); + JSStringRelease(string); + return ret; +} /* js_get_string_property {{{*/ char * js_get_string_property(JSContextRef ctx, JSObjectRef arg, const char *name) { |