summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-26 09:01:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-26 09:01:23 +0000
commitb2fc5d308b4a8a16ce4e16d5de904667bf72c74a (patch)
treece5ba175fb71b5ed8bb7bff9ca2810b7120a0688 /util.c
parentb10aefbe9c954f13ef172cff59fa9733b8b86490 (diff)
downloadruby-b2fc5d308b4a8a16ce4e16d5de904667bf72c74a.tar.gz
ruby-b2fc5d308b4a8a16ce4e16d5de904667bf72c74a.tar.xz
ruby-b2fc5d308b4a8a16ce4e16d5de904667bf72c74a.zip
* thread.c (blocking_region_{begin,end}): declared as inline.
* util.c (freedtoa): used only when MULTIPLE_THREADS is not defined. * win32/win32.c (rb_w32_pipe): serial is DWORD. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util.c b/util.c
index 83245d7e0..dc85183b1 100644
--- a/util.c
+++ b/util.c
@@ -3086,6 +3086,7 @@ nrv_alloc(const char *s, char **rve, int n)
return rv;
}
+#ifndef MULTIPLE_THREADS
/* freedtoa(s) must be used to free values s returned by dtoa
* when MULTIPLE_THREADS is #defined. It should be used in all cases,
* but for consistency with earlier versions of dtoa, it is optional
@@ -3098,11 +3099,8 @@ freedtoa(char *s)
Bigint *b = (Bigint *)((int *)s - 1);
b->maxwds = 1 << (b->k = *(int*)b);
Bfree(b);
-#ifndef MULTIPLE_THREADS
- if (s == dtoa_result)
- dtoa_result = 0;
-#endif
}
+#endif
/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
*