Message129630
Here is an excerpt:
libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.9) => /lib64/libc.so.6
libc.so.6 (libc6, OS ABI: Linux 2.6.9) => /lib/libc.so.6
The "OS ABI" thing is not always there:
libdrm.so.2 (libc6,x86-64) => /usr/lib64/libdrm.so.2
libdrm.so.2 (libc6) => /usr/lib/libdrm.so.2
As you see, there are two of them with the same name but in a different path. If you return the absolute path, there is a 50% possibility that you are returning the wrong one ;)
There seem to be two key differences between the original implementation and yours:
- the orig impl matches the abi_type at the beginning of the parentheses, yours simply ignores the abi_type (that should have caught my eye, but that regex looked so much like magic that I didn't try to make sense of it :-))
- the orig impl returns the file name from the beginning of the matched line, yours returns the full path from the end of the line
I guess it should be doable to retain the speed benefit while implementing a matching algorithm closer to the original one. |
|
Date |
User |
Action |
Args |
2011-02-27 15:00:46 | pitrou | set | recipients:
+ pitrou, theller, jonash |
2011-02-27 15:00:46 | pitrou | set | messageid: <1298818846.67.0.721769806084.issue11258@psf.upfronthosting.co.za> |
2011-02-27 15:00:46 | pitrou | link | issue11258 messages |
2011-02-27 15:00:45 | pitrou | create | |
|