* ext/io/wait/wait.c (io_ready_p): protoize.
* pack.c (define_swapx): should not use plain malloc. * ext/curses/curses.c (curses_getmouse): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0227035dd3
commit
13556ea5ee
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Mon Jul 17 22:55:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/io/wait/wait.c (io_ready_p): protoize.
|
||||||
|
|
||||||
|
Mon Jul 17 13:43:05 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* pack.c (define_swapx): should not use plain malloc.
|
||||||
|
|
||||||
|
* ext/curses/curses.c (curses_getmouse): ditto.
|
||||||
|
|
||||||
Mon Jul 17 12:58:41 2006 WATANABE Hirofumi <eban@ruby-lang.org>
|
Mon Jul 17 12:58:41 2006 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: should use ac_cv_lib_dl_dlopen=no on MinGW.
|
* configure.in: should use ac_cv_lib_dl_dlopen=no on MinGW.
|
||||||
|
@ -646,7 +646,7 @@ curses_getmouse(VALUE obj)
|
|||||||
|
|
||||||
val = Data_Make_Struct(cMouseEvent,struct mousedata,
|
val = Data_Make_Struct(cMouseEvent,struct mousedata,
|
||||||
0,curses_mousedata_free,mdata);
|
0,curses_mousedata_free,mdata);
|
||||||
mdata->mevent = (MEVENT*)malloc(sizeof(MEVENT));
|
mdata->mevent = (MEVENT*)xmalloc(sizeof(MEVENT));
|
||||||
return (getmouse(mdata->mevent) == OK) ? val : Qnil;
|
return (getmouse(mdata->mevent) == OK) ? val : Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ EXTERN struct timeval rb_time_interval _((VALUE time));
|
|||||||
=end
|
=end
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
io_ready_p(io)
|
io_ready_p(VALUE io)
|
||||||
VALUE io;
|
|
||||||
{
|
{
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
ioctl_arg n;
|
ioctl_arg n;
|
||||||
|
7
pack.c
7
pack.c
@ -52,18 +52,17 @@
|
|||||||
|
|
||||||
#define define_swapx(x, xtype) \
|
#define define_swapx(x, xtype) \
|
||||||
static xtype \
|
static xtype \
|
||||||
TOKEN_PASTE(swap,x)(z) \
|
TOKEN_PASTE(swap,x)(xtype z) \
|
||||||
xtype z; \
|
|
||||||
{ \
|
{ \
|
||||||
xtype r; \
|
xtype r; \
|
||||||
xtype *zp; \
|
xtype *zp; \
|
||||||
unsigned char *s, *t; \
|
unsigned char *s, *t; \
|
||||||
int i; \
|
int i; \
|
||||||
\
|
\
|
||||||
zp = malloc(sizeof(xtype)); \
|
zp = xmalloc(sizeof(xtype)); \
|
||||||
*zp = z; \
|
*zp = z; \
|
||||||
s = (unsigned char*)zp; \
|
s = (unsigned char*)zp; \
|
||||||
t = malloc(sizeof(xtype)); \
|
t = xmalloc(sizeof(xtype)); \
|
||||||
for (i=0; i<sizeof(xtype); i++) { \
|
for (i=0; i<sizeof(xtype); i++) { \
|
||||||
t[sizeof(xtype)-i-1] = s[i]; \
|
t[sizeof(xtype)-i-1] = s[i]; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user