Skip to content

_ctypes pt. 2 - #5524

Merged
youknowone merged 14 commits into
RustPython:mainfrom
arihant2math:ctypes-pt2
Feb 20, 2025
Merged

youknowone merged 14 commits into
RustPython:mainfrom
arihant2math:ctypes-pt2

Conversation

@arihant2math

@arihant2math arihant2math commented Feb 15, 2025 •

Copy link
Copy Markdown
Contributor

Successor to #5519

  • Add __version__ attribute
  • Add some structured data types
  • get c_int and c_float working
  • get create_string_buffer working out of scope for this pr
  • get LoadLibrary working
  • Add some constants ctypes wants to import
  • Stub some more functions

The following works now (I've added it to extra_tests):

# test code from previous pr here
i = c_int(42)
f = c_float(3.14)
assert i.value == 42
assert f.value == 3.14

Comment thread vm/src/stdlib/ctypes/base.rs Resolved
Comment thread vm/src/stdlib/ctypes/base.rs Resolved
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
Signed-off-by: Ashwin Naren <[email protected]>
@arihant2math
arihant2math marked this pull request as ready for review February 18, 2025 21:56
Signed-off-by: Ashwin Naren <[email protected]>

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

@youknowone
youknowone merged commit e2b0fe4 into RustPython:main Feb 20, 2025
@arihant2math
arihant2math deleted the ctypes-pt2 branch February 20, 2025 18:43
@arihant2math arihant2math mentioned this pull request Feb 28, 2025
15 of 28 tasks
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.

2 participants