summaryrefslogtreecommitdiff
path: root/src/helper/jim.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-10-14 20:04:33 -0700
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-10-14 20:04:33 -0700
commit510db585fd3996ff075539aac413eee955bf23b2 (patch)
treead64d42a86c79d2354e3e906731c0831d701b9a2 /src/helper/jim.c
parentbc792857a5cbfb603a5c3be5ac62d9d54981959c (diff)
downloadopenocd+libswd-510db585fd3996ff075539aac413eee955bf23b2.tar.gz
openocd+libswd-510db585fd3996ff075539aac413eee955bf23b2.tar.bz2
openocd+libswd-510db585fd3996ff075539aac413eee955bf23b2.tar.xz
openocd+libswd-510db585fd3996ff075539aac413eee955bf23b2.zip
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>
Diffstat (limited to 'src/helper/jim.c')
-rw-r--r--src/helper/jim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helper/jim.c b/src/helper/jim.c
index 48e21e9e..dfee1dd5 100644
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -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);