Instantiating an Object with the Same Object as an Argument?

Ron Tarrant rontarrant at gmail.com
Wed Apr 17 15:07:52 UTC 2019


On Wednesday, 17 April 2019 at 15:05:22 UTC, Adam D. Ruppe wrote:
> On Wednesday, 17 April 2019 at 14:49:33 UTC, Ron Tarrant wrote:
>> For instance, one of the Adjustment constructors looks like 
>> this:
>>
>> 	public this(GtkAdjustment* gtkAdjustment, bool ownedRef
>
>
> Those aren't the same thing! One is Adjustment, the D wrapper 
> class, and the other is GtkAdjustment*, the C structure pointer.
>
> This constructor is for cases when you have an existing object 
> made via the C api and you want the D wrapper to adopt it.

Ah! Thanks for clearing that up, Adam. I shall go blush now for 
not reading more closely.


More information about the Digitalmars-d-learn mailing list