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

Feature Request: Pointer Arithmetic #5267

Closed
p6rt opened this issue Apr 26, 2016 · 6 comments
Closed

Feature Request: Pointer Arithmetic #5267

p6rt opened this issue Apr 26, 2016 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 26, 2016

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

Searchable as RT128000$

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

From @dwarring

Basically, I'd like the following code to work. Currently, you can't do any arithmetic on a pointer such as ++$p on a pointer, or $p += 4

use NativeCall;
my CArray[uint16] $a .= new​: 10, 20 ... 100;

# point to $a[0] (working)
my $p = nativecast(Pointer[uint16], $a);

# should point to $a[1]
++$p;
$ should point to $a[5]
$p += 4;

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

From @salortiz

Hi David,

Can you give a try to NativeHelpers​::Pointer, part of NativeHelpers​::Blob?

When well tested I plan push it to core.

Regards.

Salvador Ortiz.

@p6rt
Copy link
Author

p6rt commented Apr 26, 2016

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

@p6rt
Copy link
Author

p6rt commented Oct 3, 2017

From @dwarring

On Tue, 26 Apr 2016 15​:24​:57 -0700, sortiz wrote​:

Hi David,

Can you give a try to NativeHelpers​::Pointer, part of NativeHelpers​::Blob?

When well tested I plan push it to core.

Regards.

Salvador Ortiz.

Hi Salvador,
That looks. OK. Can it go straight into core?

@p6rt
Copy link
Author

p6rt commented Oct 11, 2017

From @dwarring

Thanks Salvador,

Now in Rakudo core rakudo/rakudo@3ca6554
On Tue, 03 Oct 2017 10​:41​:41 -0700, david.warring wrote​:

On Tue, 26 Apr 2016 15​:24​:57 -0700, sortiz wrote​:

Hi David,

Can you give a try to NativeHelpers​::Pointer, part of NativeHelpers​::Blob?

When well tested I plan push it to core.

Regards.

Salvador Ortiz.

Hi Salvador,
That looks. OK. Can it go straight into core?

@p6rt p6rt closed this as completed Oct 11, 2017
@p6rt
Copy link
Author

p6rt commented Oct 11, 2017

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

@p6rt p6rt added the NativeCall 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