Changeset 377
- Timestamp:
- Nov 3, 2012, 2:59:08 PM (12 years ago)
- Location:
- trunk/zoo-project
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-api/js/ZOO-api.js
r342 r377 414 414 } 415 415 return destination; 416 }; 417 418 ZOO._=function(str){ 419 return ZOOTranslate(str); 416 420 }; 417 421 -
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 -
trunk/zoo-project/zoo-kernel/service_internal_js.h
r368 r377 44 44 maps* mapsFromJSObject(JSContext *,jsval); 45 45 map* mapFromJSObject(JSContext *,jsval); 46 JSBool JSTranslate(JSContext*, uintN, jsval*); 46 47 JSBool JSRequest(JSContext*, uintN, jsval*); 47 48
Note: See TracChangeset
for help on using the changeset viewer.