Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001142OCamlCamlIDLpublic2002-05-05 20:132002-05-07 10:19
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001142: camlidl: [unique] and [ptr] attributes are broken now!
DescriptionFull_Name: Dmitry Bely
Version: camlidl CVS version
OS: Windows 2000
Submission from: d065.p9.col.ru (212.248.7.65)


I have just updated camlidl from CVS and found out that [unique] attribute do
not work any longer. The declaration

typedef [unique,string] char* OptionalString;

now generates

type optionalString = string

instead of

type optionalString = string option

as it did before. [ptr] attribute does not work also. It also seems that you
decided to change the default string and bigarray attribute from [unique] to
[ref] (if I understand compiler/parse_aux.ml correctly). Why this was not
mentioned in the "Changes"? :-)

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000085)
administrator (administrator)
2002-05-06 09:36

> I have just updated camlidl from CVS and found out that [unique] attribute do
> not work any longer. The declaration
>
> typedef [unique,string] char* OptionalString;
>
> now generates
>
> type optionalString = string
>
> instead of
>
> type optionalString = string option
>
> as it did before. [ptr] attribute does not work also. It also seems that you
> decided to change the default string and bigarray attribute from [unique] to
> [ref] (if I understand compiler/parse_aux.ml correctly).

Correct. I got enough complaints about the old behavior
(i.e. *pointer* default attribute should not apply to strings or
arrays). However, due to a weakness of the current parsing of attributes,

        typedef [unique,string] char* OptionalString;

doesn't do what you want (a possibly NULL string), but

        typedef [string,unique] char* OptionalString;

does. I'll try to fix this soon.

> Why this was not mentioned in the "Changes"? :-)

Quoting from Changes:

* Strings, arrays and bigarrays are now non-NULL if "unique" is not specified,
  even if the pointer default is "unique".

Might have been phrased more clearly, perhaps.

- Xavier Leroy

(0000086)
administrator (administrator)
2002-05-07 10:19

[string,unique] works as expected, [unique,string] does not, to be fixed.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker