Changeset 377 for trunk/zoo-project/zoo-kernel/service_internal_js.c
- Timestamp:
- Nov 3, 2012, 2:59:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_js.c
r368 r377 128 128 if (!JS_DefineFunction(cx, global, "ZOORequest", JSRequest, 4, 0)) 129 129 return 1; 130 if (!JS_DefineFunction(cx, global, "ZOOTranslate", JSTranslate, 4, 0)) 131 return 1; 130 132 if (!JS_DefineFunction(cx, global, "ZOOUpdateStatus", JSUpdateStatus, 2, 0)) 131 133 return 1; … … 702 704 } 703 705 return handle; 706 } 707 708 JSBool 709 JSTranslate(JSContext *cx, uintN argc, jsval *argv1) 710 { 711 jsval *argv = JS_ARGV(cx,argv1); 712 char *str=JSValToChar(cx,&argv[0]); 713 char *tmpValue=_ss(str); 714 JS_SET_RVAL(cx, argv1,STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpValue,strlen(tmpValue)))); 715 JS_MaybeGC(cx); 716 return JS_TRUE; 704 717 } 705 718
Note: See TracChangeset
for help on using the changeset viewer.