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

Need ssize_t for Rakudo NativeCall #5209

Closed
p6rt opened this issue Apr 2, 2016 · 7 comments
Closed

Need ssize_t for Rakudo NativeCall #5209

p6rt opened this issue Apr 2, 2016 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Apr 2, 2016

Migrated from rt.perl.org#127823 (status was 'resolved')

Searchable as RT127823$

@p6rt
Copy link
Author

p6rt commented Apr 2, 2016

From @tbrowder

I'm trying the native call interface and see that a ssize_t is needed for certain libc functions such as 'getline', but it is not listed in the types available in https://doc.perl6.org/language/nativecall.

@p6rt
Copy link
Author

p6rt commented Apr 2, 2016

From @FROGGS

You can define them yourself​:

native size_t is Int is ctype("size_t") is unsigned is repr("P6int") { };
native ssize_t is Int is ctype("size_t") is repr("P6int") { };

On the other hand, rakudo already exposes size_t, sadly it is not marked 'is unsigned', so that wants fixing.

@p6rt
Copy link
Author

p6rt commented Apr 2, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Apr 2, 2016

From @tbrowder

On Saturday, April 2, 2016, Tobias Leich via RT <
perl6-bugs-followup@​perl.org> wrote​:

You can define them yourself​:

native size_t is Int is ctype("size_t") is unsigned is repr("P6int") { };
native ssize_t is Int is ctype("size_t") is repr("P6int") { };

Thanks, Tobias!

Best,

-Tom

@p6rt
Copy link
Author

p6rt commented Apr 29, 2016

From @dwarring

Commit rakudo/rakudo@a63deba adds a definition for ssize_t and sets size_t to unsigned.

On Sat Apr 02 16​:45​:42 2016, tom.browder@​gmail.com wrote​:

On Saturday, April 2, 2016, Tobias Leich via RT <
perl6-bugs-followup@​perl.org> wrote​:

You can define them yourself​:

native size_t is Int is ctype("size_t") is unsigned is repr("P6int") { };
native ssize_t is Int is ctype("size_t") is repr("P6int") { };

Thanks, Tobias!

Best,

-Tom

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

Tests added in rakudo/rakudo#823

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 10, 2016
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant