[Gtk-sharp-list] Possible Error in gapi2-parser util.

Everaldo Canuto everaldo.canuto at gmail.com
Wed Sep 28 05:04:06 EDT 2005


Hi Enzo,


I have interest in planner binds too and when I checkout last sources I
find some C# sources in it. It is made by you? If not maybe you can use
part of this job.

If you need some help, let me know, you know how find me :)


Regards,
Everaldo

Em Ter, 2005-09-27 às 22:33 -0600, enzo - Eduardo Garcia escreveu:
> Hi people.
> 
> Today  I'm begin to make a binding to planner-dev project, this project 
> you can see  here [1], to make this binding i use
> this documentation [2] from mono project site.
> 
> Everything is ok!, Except a one transformartion from planner-dev, the 
> error is a enum transformation, this its a enum in the file 
> mrp-storage-module.h
> 
> typedef enum {
>         MRP_STORAGE_NONE                = 0,
>         MRP_STORAGE_READABLE            = 1 << 0,
>         MRP_STORAGE_WRITABLE            = 1 << 1,
>         MRP_STORAGE_DIRECT_WRITE        = 1 << 2,
>         MRP_STORAGE_SUPPORTS_TASK       = 1 << 3,
>         MRP_STORAGE_SUPPORTS_RESOURCE   = 1 << 4,
>         MRP_STORAGE_SUPPORTS_PRIMARY    = 1 << 5,
> 
>         MRP_STORAGE_READWRITE           = (MRP_STORAGE_READABLE |
>                                             MRP_STORAGE_WRITABLE),
> 
>         MRP_STORAGE_SUPPORTS_ALL        = (MRP_STORAGE_SUPPORTS_TASK |
>                                            MRP_STORAGE_SUPPORTS_RESOURCE |
>                                            MRP_STORAGE_SUPPORTS_PRIMARY)
> } MrpStorageModuleFlags;
> 
> 
> when im run #gapi2-parser sources/planner.sources.xml
> 
> this command tranforms the enum in this code:
> 
> namespace PLanner {
> 
>         using System;
>         using System.Runtime.InteropServices;
> 
> #region Autogenerated code
>         [Flags]
>         public enum MrpStorageModuleFlags {
> 
>                 None,
>                 Readable = 1 << 0,
>                 Writable = 1 << 1,
>                 DirectWrite = 1 << 2,
>                 SupportsTask = 1 << 3,
>                 SupportsResource = 1 << 4,
>                 SupportsPrimary = 1 << 5,
>                 Readwrite = MRP_STORAGE_READABLE |MRP_STORAGE_WRITABLE,
>                 SupportsAll = MRP_STORAGE_SUPPORTS_TASK 
> |MRP_STORAGE_SUPPORTS_RESOURCE |MRP_STORAGE_SUPPORTS_PRIMARY,
>         }
> #endregion
> }
> 
> 
> the problem is the last definitions use previus definitions in the enum. 
> so when gapi2-parser transforms the enum cannot detect this and make a 
> wrong transformatios.
> 
> The questions is, is real error or bug or i is this a bad programming way?
> 
> please check this question and say me if you thinks i need post a bug 
> from gtk-sharp bugzilla.
> 
> 
> thanks.
> 
> enzo
> Eduardo Garcia.
> 
> [1] http://developer.imendio.com/wiki/Planner
> [2] http://www.mono-project.com/GAPI
> 
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list



More information about the Gtk-sharp-list mailing list