Thread overview
custom union allocator not called
Apr 02, 2005
Thomas Kuehne
Apr 02, 2005
Regan Heath
Apr 02, 2005
Thomas Kuehne
Apr 02, 2005
Regan Heath
April 02, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


# union MyUnion{
#        new(size_t size){
#                return malloc(size);
#        }
# }

Added to DStress as
http://dstress.kuehne.cn/run/new_13.d

Thomas



-----BEGIN PGP SIGNATURE-----

iD8DBQFCTnGK3w+/yD4P9tIRAg3/AJ9hsAKH/WrYjBVM49dIZLFxx229uQCgnnMi
991KmogqlPZ+6PcgS2jmSRo=
=i5FR
-----END PGP SIGNATURE-----
April 02, 2005
On Sat, 2 Apr 2005 12:18:50 +0200, Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> # union MyUnion{
> #        new(size_t size){
> #                return malloc(size);
> #        }
> # }
>
> Added to DStress as
> http://dstress.kuehne.cn/run/new_13.d

My impression of:
http://www.digitalmars.com/d/memory.html#newdelete

is that these are only possible for classes?

Regan
April 02, 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Regan Heath schrieb am Sat, 02 Apr 2005 22:33:26 +1200:
> On Sat, 2 Apr 2005 12:18:50 +0200, Thomas Kuehne
><thomas-dloop@kuehne.thisisspam.cn> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>> # union MyUnion{
>> #        new(size_t size){
>> #                return malloc(size);
>> #        }
>> # }
>>
>> Added to DStress as
>> http://dstress.kuehne.cn/run/new_13.d
>
> My impression of: http://www.digitalmars.com/d/memory.html#newdelete
>
> is that these are only possible for classes?

New in dmd-0.119:
#  Changed documentation on struct/union grammar to allow invariants,
#  unit tests, and allocator/deallocators.

See also StructBodyDeclaration at http://www.digitalmars.com/d/struct.html

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCTn1R3w+/yD4P9tIRAg43AKDBB+YjFqX+GFlezkxqjUwXVzTzMgCdFNCz
vKVZXl7FKXGYtBoPRgdummk=
=AG9+
-----END PGP SIGNATURE-----
April 02, 2005
On Sat, 2 Apr 2005 13:09:05 +0200, Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn> wrote:
> Regan Heath schrieb am Sat, 02 Apr 2005 22:33:26 +1200:
>> On Sat, 2 Apr 2005 12:18:50 +0200, Thomas Kuehne
>> <thomas-dloop@kuehne.thisisspam.cn> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>>
>>> # union MyUnion{
>>> #        new(size_t size){
>>> #                return malloc(size);
>>> #        }
>>> # }
>>>
>>> Added to DStress as
>>> http://dstress.kuehne.cn/run/new_13.d
>>
>> My impression of:
>> http://www.digitalmars.com/d/memory.html#newdelete
>>
>> is that these are only possible for classes?
>
> New in dmd-0.119:
> #  Changed documentation on struct/union grammar to allow invariants,
> #  unit tests, and allocator/deallocators.
>
> See also StructBodyDeclaration at http://www.digitalmars.com/d/struct.html

Ok.. docs need updating.

Regan