return key;
}
-/* Identity hash function for integer keys */
-unsigned int Jim_IdentityHashFunction(unsigned int key)
-{
- return key;
-}
-
/* Generic hash function (we are using to multiply by 9 and add the byte
* as Tcl) */
static unsigned int Jim_GenHashFunction(const unsigned char *buf, int len)
objPtr->length += len;
}
-/* Low-level wrapper to append an object. */
-void StringAppendObj(Jim_Obj *objPtr, Jim_Obj *appendObjPtr)
-{
- int len;
- const char *str;
-
- str = Jim_GetString(appendObjPtr, &len);
- StringAppendString(objPtr, str, len);
-}
-
/* Higher level API to append strings to objects. */
void Jim_AppendString(Jim_Interp *interp, Jim_Obj *objPtr, const char *str,
int len)
return Jim_IntHashFunction(intValue);
}
-unsigned int JimReferencesHTDoubleHashFunction(const void *key)
-{
- /* Only the least significant bits are used. */
- const jim_wide *widePtr = key;
- unsigned int intValue = (unsigned int) *widePtr;
- return intValue; /* identity function. */
-}
-
static const void *JimReferencesHTKeyDup(void *privdata, const void *key)
{
void *copy = Jim_Alloc(sizeof(jim_wide));
JIM_REGISTER_API(CollectIfNeeded);
JIM_REGISTER_API(GetIndex);
JIM_REGISTER_API(NewListObj);
+ JIM_REGISTER_API(ListInsertElements);
JIM_REGISTER_API(ListAppendElement);
JIM_REGISTER_API(ListAppendList);
JIM_REGISTER_API(ListLength);
Jim_fprintf(interp,interp->cookie_stderr, "%s" JIM_NL,
Jim_GetString(interp->result, NULL));
Jim_ListLength(interp, interp->stackTrace, &len);
- for (i = len-3; i >= 0; i-= 3) {
+ for (i = 0; i < len; i += 3) {
Jim_Obj *objPtr=NULL;
const char *proc, *file, *line;