portability updates
Based on some patches from <redirect.slash.nil@gmail.com> for preliminary Win64 compilation. More such updates are needed, but they need work. Compile tested on 64 and 32 bit Linuxes, and Cygwin. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
@@ -4754,7 +4754,7 @@ const char *Jim_GetSharedString(Jim_Interp *interp, const char *str)
|
||||
Jim_AddHashEntry(&interp->sharedStrings, strCopy, (void*)1);
|
||||
return strCopy;
|
||||
} else {
|
||||
long refCount = (long) he->val;
|
||||
intptr_t refCount = (intptr_t) he->val;
|
||||
|
||||
refCount++;
|
||||
he->val = (void*) refCount;
|
||||
@@ -4764,13 +4764,13 @@ const char *Jim_GetSharedString(Jim_Interp *interp, const char *str)
|
||||
|
||||
void Jim_ReleaseSharedString(Jim_Interp *interp, const char *str)
|
||||
{
|
||||
long refCount;
|
||||
intptr_t refCount;
|
||||
Jim_HashEntry *he = Jim_FindHashEntry(&interp->sharedStrings, str);
|
||||
|
||||
if (he == NULL)
|
||||
Jim_Panic(interp,"Jim_ReleaseSharedString called with "
|
||||
"unknown shared string '%s'", str);
|
||||
refCount = (long) he->val;
|
||||
refCount = (intptr_t) he->val;
|
||||
refCount--;
|
||||
if (refCount == 0) {
|
||||
Jim_DeleteHashEntry(&interp->sharedStrings, str);
|
||||
|
||||
Reference in New Issue
Block a user