Is There a bug in CCScheduler::scheduleScriptFunc and CCScheduler::unscheduleScriptFunc

Please the below codes:

`void CCScheduler::scheduleScriptFunc(const char *pszFuncName, ccTime fInterval, bool bPaused)
{
//assert(pfnSelector);
assert(pszFuncName);

tHashScriptFuncEntry *pElement = NULL;
HASH_FIND_ADD_INT(m_pHashForScriptFunctions, &pszFuncName, pElement);
`

Is it HASH_FIND_ADD_INT?
I think it should be HASH_FIND_ADD_STR.
The same as the below HASH_ADD_INT
and in unscheduleScriptFunc function

I agree with you, HASH_FIND_STR is better than HASH_FIND_INT. But we can not use HASH_ADD_STR, its definition is:

#define HASH_ADD_STR(head,strfield,add)                                          \
    HASH_ADD(hh,head,strfield,strlen(add->strfield),add)

As you see, it use strlen(add->strfield) to compute the length. But we have not a string inside the structure, because we don’t know how many characters it should have. As the manual said, should use HASH_ADD_KEYPT to add the element. But the version of thash.h doesn’t define the macro.

So, we use HASH_FIND_STR to find the element and use HASH_ADD_INT to add the element?