mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/strscan/strscan.c (strscan_init_copy): struct re_registers must
not be bitwise copied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
50c4555072
commit
3b16f66bf7
2 changed files with 11 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
|||
Sat Mar 6 14:27:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Mar 6 15:15:05 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/strscan/depend: depends on re.h and regex.h.
|
||||
|
||||
* ext/strscan/strscan.c: no version check needed.
|
||||
|
||||
* ext/strscan/strscan.c (strscan_init_copy): struct re_registers must
|
||||
not be bitwise copied.
|
||||
|
||||
Sat Mar 6 11:14:33 2004 David Black <dblack@wobblini.net>
|
||||
|
||||
* lib/scanf.rb: refixed the previous fix in IO#block_scanf
|
||||
|
|
|
@ -240,7 +240,13 @@ strscan_init_copy(vself, vorig)
|
|||
Data_Get_Struct(vself, struct strscanner, self);
|
||||
check_strscan(vorig);
|
||||
Data_Get_Struct(vorig, struct strscanner, orig);
|
||||
memmove(self, orig, sizeof(struct strscanner));
|
||||
if (self != orig) {
|
||||
self->flags = orig->flags;
|
||||
self->str = orig->str;
|
||||
self->prev = orig->prev;
|
||||
self->curr = orig->curr;
|
||||
re_copy_registers(&self->regs, &orig->regs);
|
||||
}
|
||||
|
||||
return vself;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue