| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,17 +34,15 @@ | |||
| 34 | 34 | FUNCFLAG_USE_ERRNO as _FUNCFLAG_USE_ERRNO, \ | |
| 35 | 35 | FUNCFLAG_USE_LASTERROR as _FUNCFLAG_USE_LASTERROR | |
| 36 | 36 | ||
| 37 | - """ | ||
| 38 | - WINOLEAPI -> HRESULT | ||
| 39 | - WINOLEAPI_(type) | ||
| 40 | - | ||
| 41 | - STDMETHODCALLTYPE | ||
| 42 | - | ||
| 43 | - STDMETHOD(name) | ||
| 44 | - STDMETHOD_(type, name) | ||
| 45 | - | ||
| 46 | - STDAPICALLTYPE | ||
| 47 | - """ | ||
| 37 | + # WINOLEAPI -> HRESULT | ||
| 38 | + # WINOLEAPI_(type) | ||
| 39 | + # | ||
| 40 | + # STDMETHODCALLTYPE | ||
| 41 | + # | ||
| 42 | + # STDMETHOD(name) | ||
| 43 | + # STDMETHOD_(type, name) | ||
| 44 | + # | ||
| 45 | + # STDAPICALLTYPE | ||
| 48 | 46 | ||
| 49 | 47 | def create_string_buffer(init, size=None): | |
| 50 | 48 | """create_string_buffer(aBytes) -> character array | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,17 +5,14 @@ | |||
| 5 | 5 | ||
| 6 | 6 | # XXX This test must be reviewed for correctness!!! | |
| 7 | 7 | ||
| 8 | - """ | ||
| 9 | - ctypes' types are container types. | ||
| 10 | - | ||
| 11 | - They have an internal memory block, which only consists of some bytes, | ||
| 12 | - but it has to keep references to other objects as well. This is not | ||
| 13 | - really needed for trivial C types like int or char, but it is important | ||
| 14 | - for aggregate types like strings or pointers in particular. | ||
| 15 | - | ||
| 16 | - What about pointers? | ||
| 17 | - | ||
| 18 | - """ | ||
| 8 | + # ctypes' types are container types. | ||
| 9 | + # | ||
| 10 | + # They have an internal memory block, which only consists of some bytes, | ||
| 11 | + # but it has to keep references to other objects as well. This is not | ||
| 12 | + # really needed for trivial C types like int or char, but it is important | ||
| 13 | + # for aggregate types like strings or pointers in particular. | ||
| 14 | + # | ||
| 15 | + # What about pointers? | ||
| 19 | 16 | ||
| 20 | 17 | class ObjectsTestCase(unittest.TestCase): | |
| 21 | 18 | def assertSame(self, a, b): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,35 +3,33 @@ | |||
| 3 | 3 | import unittest | |
| 4 | 4 | ||
| 5 | 5 | # Bob Ippolito: | |
| 6 | - """ | ||
| 7 | - Ok.. the code to find the filename for __getattr__ should look | ||
| 8 | - something like: | ||
| 9 | - | ||
| 10 | - import os | ||
| 11 | - from macholib.dyld import dyld_find | ||
| 12 | - | ||
| 13 | - def find_lib(name): | ||
| 14 | - possible = ['lib'+name+'.dylib', name+'.dylib', | ||
| 15 | - name+'.framework/'+name] | ||
| 16 | - for dylib in possible: | ||
| 17 | - try: | ||
| 18 | - return os.path.realpath(dyld_find(dylib)) | ||
| 19 | - except ValueError: | ||
| 20 | - pass | ||
| 21 | - raise ValueError, "%s not found" % (name,) | ||
| 22 | - | ||
| 23 | - It'll have output like this: | ||
| 24 | - | ||
| 25 | - >>> find_lib('pthread') | ||
| 26 | - '/usr/lib/libSystem.B.dylib' | ||
| 27 | - >>> find_lib('z') | ||
| 28 | - '/usr/lib/libz.1.dylib' | ||
| 29 | - >>> find_lib('IOKit') | ||
| 30 | - '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit' | ||
| 31 | - | ||
| 32 | - -bob | ||
| 33 | - | ||
| 34 | - """ | ||
| 6 | + # | ||
| 7 | + # Ok.. the code to find the filename for __getattr__ should look | ||
| 8 | + # something like: | ||
| 9 | + # | ||
| 10 | + # import os | ||
| 11 | + # from macholib.dyld import dyld_find | ||
| 12 | + # | ||
| 13 | + # def find_lib(name): | ||
| 14 | + # possible = ['lib'+name+'.dylib', name+'.dylib', | ||
| 15 | + # name+'.framework/'+name] | ||
| 16 | + # for dylib in possible: | ||
| 17 | + # try: | ||
| 18 | + # return os.path.realpath(dyld_find(dylib)) | ||
| 19 | + # except ValueError: | ||
| 20 | + # pass | ||
| 21 | + # raise ValueError, "%s not found" % (name,) | ||
| 22 | + # | ||
| 23 | + # It'll have output like this: | ||
| 24 | + # | ||
| 25 | + # >>> find_lib('pthread') | ||
| 26 | + # '/usr/lib/libSystem.B.dylib' | ||
| 27 | + # >>> find_lib('z') | ||
| 28 | + # '/usr/lib/libz.1.dylib' | ||
| 29 | + # >>> find_lib('IOKit') | ||
| 30 | + # '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit' | ||
| 31 | + # | ||
| 32 | + # -bob | ||
| 35 | 33 | ||
| 36 | 34 | from ctypes.macholib.dyld import dyld_find | |
| 37 | 35 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments