diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-13 18:55:54 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-13 18:55:54 +0000 |
| commit | 55007277a1dfd1549067af324752cfb15a2b5d4c (patch) | |
| tree | c7907b17405801887c72d4e73ef6705771ab9a1f | |
| parent | a90803c111012df9a805f2f146be063ad2b43a3c (diff) | |
| download | ruby-55007277a1dfd1549067af324752cfb15a2b5d4c.tar.gz ruby-55007277a1dfd1549067af324752cfb15a2b5d4c.tar.xz ruby-55007277a1dfd1549067af324752cfb15a2b5d4c.zip | |
* win32/mkexports.rb: deal with __fastcall name decorations.
[ruby-list:44111]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | bcc32/mkexports.rb | 2 | ||||
| -rwxr-xr-x | win32/mkexports.rb | 6 |
3 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Sun Oct 14 03:55:52 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * win32/mkexports.rb: deal with __fastcall name decorations. + [ruby-list:44111] + Sun Oct 14 02:20:40 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * encoding.c (rb_cEncoding): new Encoding class. diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb index 965a09b82..1b498f851 100755 --- a/bcc32/mkexports.rb +++ b/bcc32/mkexports.rb @@ -15,7 +15,7 @@ class Exports::Bcc < Exports opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32" IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul") do |l| next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l - yield $1, !$2 /'(.*?)'\s+Segment:\s+_(TEXT)?/ =~ l + yield $1 if /'(.*?)'/ =~ l end end yield "_strcasecmp", "_stricmp" diff --git a/win32/mkexports.rb b/win32/mkexports.rb index e9a81345d..0c17466e0 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -92,9 +92,9 @@ class Exports::Mswin < Exports next if /^[[:xdigit:]]+ 0+ UNDEF / =~ l next unless l.sub!(/.*?\s(\(\)\s+)?External\s+\|\s+/, '') is_data = !$1 - if noprefix or l.sub!(/^_/, '') - next if /@.*@/ =~ l || /@[[:xdigit:]]{16}$/ =~ l - l.sub!(/^/, '_') if /@\d+$/ =~ l + if noprefix or /^[@_]/ =~ l + next if /(?!^)@.*@/ =~ l || /@[[:xdigit:]]{16}$/ =~ l + l.sub!(/^[@_]/, '') if /@\d+$/ !~ l elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1') next end |
