summaryrefslogtreecommitdiff
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
commit860fad971d2bdaad7b9e78adef80f6db9d8ec1cf (patch)
treece5ba175fb71b5ed8bb7bff9ca2810b7120a0688
parent425dcb131eeea65293a354901b03f1fdd5c28756 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--thread.c6
-rw-r--r--util.c6
-rw-r--r--win32/win32.c2
4 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ab47f768d..1f102ef180 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Oct 26 18:01:06 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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.
+
Sun Oct 26 13:30:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (read_all): use the given buffer to read when needs readconv.
diff --git a/thread.c b/thread.c
index cf667e19db..2407bf8d07 100644
--- a/thread.c
+++ b/thread.c
@@ -95,9 +95,9 @@ static void set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func, v
struct rb_unblock_callback *old);
static void reset_unblock_function(rb_thread_t *th, const struct rb_unblock_callback *old);
-static void blocking_region_begin(rb_thread_t *th, struct rb_blocking_region_buffer *region,
- rb_unblock_function_t *func, void *arg);
-static void blocking_region_end(rb_thread_t *th, struct rb_blocking_region_buffer *region);
+static void inline blocking_region_begin(rb_thread_t *th, struct rb_blocking_region_buffer *region,
+ rb_unblock_function_t *func, void *arg);
+static void inline blocking_region_end(rb_thread_t *th, struct rb_blocking_region_buffer *region);
#define GVL_UNLOCK_BEGIN() do { \
rb_thread_t *_th_stored = GET_THREAD(); \
diff --git a/util.c b/util.c
index 83245d7e0a..dc85183b1e 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.
*
diff --git a/win32/win32.c b/win32/win32.c
index b0db5f40b8..c3a5c8c5dd 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4182,7 +4182,7 @@ rb_w32_pipe(int fds[2])
return _pipe(fds, 65536L, _O_NOINHERIT);
p = strchr(name, '0');
- snprintf(p, strlen(p) + 1, "%x-%x", rb_w32_getpid(), serial++);
+ snprintf(p, strlen(p) + 1, "%x-%lx", rb_w32_getpid(), serial++);
sec.nLength = sizeof(sec);
sec.lpSecurityDescriptor = NULL;