Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

9
Converting `Ada.Containors.Vectors.Vector` into C array
Post Flair (click to view more posts with a particular flair)
Post Body

The C bindings I'm making have some declarations like so:

ada type syz_SineBankConfig is record waves : access constant syz_SineBankWave; -- synthizer.h:273 wave_count : aliased Extensions.unsigned_long_long; -- synthizer.h:274 initial_frequency : aliased double; -- synthizer.h:275 end record with Convention => C_Pass_By_Copy; -- synthizer.h:272

And as an Ada declaration I've transformed it into:

ada type Sine_Bank_Wave is record Frequency_Mul: Long_Long_Float; Phase: Long_Long_Float; Gain: Long_Long_Float; end record; package Sine_Bank_Waves is new Ada.Containers.Vectors(Natural, Sine_Bank_Wave); type Sine_Bank_Config is record Waves: Sine_Bank_Waves.Vector; Initial_Frequency: Long_Long_Float; end record;

I however need to be able to convert from Sine_Bank_Config to syz_SineBankConfig. The trouble I'm running into is that I can't seem to find a way to do this via the Ada.Containers.Vectors package itself, and there doesn't seem to be any obvious way through Interfaces.C. Should I re-declare these types as something else that's easier to convert, or is there some way I missed?

Author
Account Strength
60%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
113
Link Karma
84
Comment Karma
29
Profile updated: 1 day ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago