1003 |
|
std::set<std::string>::const_iterator sch_end = sch.end(); |
1004 |
|
for (std::set<std::string>::const_iterator it =sch.begin(); |
1005 |
|
it != sch_end; ++ it ) { |
1006 |
< |
/// tmp = (*it); |
1007 |
< |
// char * key = new char[ tmp.size() ]; |
1008 |
< |
// key = strdup(tmp.c_str()); |
1006 |
> |
unsigned int size = it->size() +1; |
1007 |
> |
char * key = new char[ size ]; |
1008 |
> |
strncpy( key, tmp.c_str(), size ); |
1009 |
|
tmp = (**jit)["JOB_SCHED_INFO."+(*it)]; |
1010 |
< |
// PyObject * val = PyString_FromString( tmp.c_str() ); |
1011 |
< |
// PyDict_SetItemString( job_dict, key, val ); |
1012 |
< |
PyDict_SetItemString( job_dict, it->c_str(), |
1010 |
> |
PyDict_SetItemString( job_dict, key, |
1011 |
|
PyString_FromString( tmp.c_str() ) ); |
1012 |
< |
// delete [] key; |
1012 |
> |
delete [] key; |
1013 |
|
} |
1014 |
|
return job_dict; |
1015 |
|
} |