Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add value to the name... #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

divinity76
Copy link

@divinity76 divinity76 commented May 11, 2022

lots of things possibly wrong with this

  • i don't know if this works on python2.7
  • i don't know if this is a good fix
  • i don't know what this might break
  • i did not run it through any testsuite (does a testsuite exist? if it does, i am unaware)

however, previously this

import ctypes
import ctypes.wintypes
from var_dump import var_dump

foo = ctypes.wintypes.ULARGE_INTEGER(123)
print(foo)
var_dump(foo)

would produce

c_ulonglong(123)
#0 object(c_ulonglong) (0)

and print() actually did a better job than var_dump() here,
but now it produce:

c_ulonglong(123)
#0 object(c_ulonglong(123)) (0)

doing at least as good a job as print :)

lots of things possibly wrong with this
- i don't know if this works on python2.7
- i don't know if this is a good fix
- i don't know what this might break
- i did not run it through any testsuite (does a testsuite exist? if it does, i am unaware)

however, previously this
```
foo = ctypes.wintypes.ULARGE_INTEGER(123)
print(foo)
var_dump(foo)
```
would produce
```
c_ulonglong(123)
object(c_ulonglong) (0)
```
and print() actually did a better job than var_dump() here,
but now it produce:
```
c_ulonglong(123)
#0 object(c_ulonglong(123)) (0)
```
doing a better job than print() :)
@divinity76
Copy link
Author

divinity76 commented May 12, 2022

just saw, this also fixes ctypes.wintypes.HANDLE :) (same problem as with ctypes.wintypes.ULARGE_INTEGER )

divinity76 added a commit to divinity76/python-var-dump that referenced this pull request May 12, 2022
lots of things possibly wrong with this
- i don't know if this works on python2.7
- i don't know if this is a good fix
- i don't know what this might break
- i did not run it through any testsuite (does a testsuite exist? if it does, i am unaware)

however, previously this
```
import ctypes
import ctypes.wintypes
from var_dump import var_dump

foo = ctypes.wintypes.ULARGE_INTEGER(123)
print(foo)
var_dump(foo)
```
would produce
```
c_ulonglong(123)
#0 object(c_ulonglong) (0)
```
and print() actually did a better job than var_dump() here,
but now it produce:
```
c_ulonglong(123)
#0 object(c_ulonglong(123)) (0)
```
doing at least as good a job as print :)
this also fixes `ctypes.wintypes.HANDLE` which has the same problem as `ctypes.wintypes.ULARGE_INTEGER`
this is an alternative to sha256#16  and fixes sha256#15
@divinity76
Copy link
Author

#17 is an alternative to this PR (eg either #16 or #17 should be merged, but not both)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant