- Timestamp:
- Apr 3, 2013, 7:31:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_js.c
r403 r410 410 410 fprintf(stderr,"tmap is not null ! (%s = %s)\n",tmap->name,tmap->value); 411 411 #endif 412 if(isArray==NULL){ 413 while(tmpm!=NULL){ 414 jsval jsstr; 415 if(isBinary!=NULL && strncasecmp(tmpm->name,"value",5)==0) 416 jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,atoi(isBinary->value))); 417 else 418 jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value))); 419 JS_SetProperty(cx, res, tmpm->name,&jsstr); 420 #ifdef JS_DEBUG 421 fprintf(stderr,"[JS] %s => %s\n",tmpm->name,tmpm->value); 422 #endif 423 tmpm=tmpm->next; 424 } 425 } 426 else{ 412 while(tmpm!=NULL){ 413 jsval jsstr; 414 if((isArray==NULL && isBinary!=NULL && strncasecmp(tmpm->name,"value",5)==0)) 415 jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,atoi(isBinary->value))); 416 else 417 jsstr = STRING_TO_JSVAL(JS_NewStringCopyN(cx,tmpm->value,strlen(tmpm->value))); 418 JS_SetProperty(cx, res, tmpm->name,&jsstr); 419 #ifdef JS_DEBUG 420 fprintf(stderr,"[JS] %s => %s\n",tmpm->name,tmpm->value); 421 #endif 422 tmpm=tmpm->next; 423 } 424 if(isArray!=NULL){ 427 425 map* len=getMap(t,"length"); 428 426 int cnt=atoi(len->value);
Note: See TracChangeset
for help on using the changeset viewer.