Changeset 508 for trunk/zoo-project/zoo-kernel/service.h
- Timestamp:
- Oct 8, 2014, 4:28:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service.h
r507 r508 437 437 tmp->value=zStrdup(v); 438 438 } 439 } 440 441 static void addToMapWithSize(map* m,const char* n,const char* v,int size){ 442 if(hasKey(m,n)==false){ 443 map* _cursor=m; 444 if(_cursor!=NULL){ 445 addToMap(m,n,""); 446 }else{ 447 m=createMap(n,""); 448 } 449 } 450 map *tmp=getMap(m,n); 451 if(tmp->value!=NULL) 452 free(tmp->value); 453 tmp->value=(char*)malloc((size+1)*sizeof(char)); 454 memmove(tmp->value,v,size*sizeof(char)); 455 tmp->value[size]=0; 456 char sin[128]; 457 sprintf(sin,"%ld",size); 458 addToMap(m,"size",sin); 439 459 } 440 460
Note: See TracChangeset
for help on using the changeset viewer.