13 messages in net.java.dev.jna.usersRe: [jna-users] Some questions about ...
FromSent OnAttachments
Albert StrasheimJan 6, 2009 11:33 am 
Timothy WallJan 6, 2009 11:58 am 
Albert StrasheimJan 6, 2009 12:08 pm 
Timothy WallJan 6, 2009 12:12 pm 
Timothy WallJan 6, 2009 12:14 pm 
Albert StrasheimJan 6, 2009 12:21 pm 
Timothy WallJan 6, 2009 12:29 pm 
Albert StrasheimJan 6, 2009 12:37 pm 
Daniel KaufmannJan 6, 2009 4:26 pm 
Albert StrasheimJan 6, 2009 6:38 pm.diff
Albert StrasheimJan 8, 2009 7:30 pm 
Paul LoyJan 9, 2009 1:40 am 
Timothy WallJan 9, 2009 4:45 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Some questions about com.sun.jna.MemoryActions...
From:Paul Loy (pa@keteracel.com)
Date:Jan 9, 2009 1:40:31 am
List:net.java.dev.jna.users

you don't need a local change to jna. Simply create a class in the jna package. Hence you can see package private members. I've done this with Structure to get at some of the package private things in there.

On Fri, Jan 9, 2009 at 3:30 AM, Albert Strasheim <full@gmail.com> wrote:

Hello all,

On Wed, Jan 7, 2009 at 4:39 AM, Albert Strasheim <full@gmail.com> wrote:

On Tue, Jan 6, 2009 at 10:38 PM, Albert Strasheim <full@gmail.com>

wrote:

On Tue, Jan 6, 2009 at 10:29 PM, Timothy Wall <twal@dev.java.net>

wrote:

Why do you need to manipulate the peer value?

As the comment in Pointer says,

The constructors are intentionally package-private, since it's not generally a good idea to be creating C pointers de novo.

I completely agree with that, but in the special case where someone wants to implement a class like Memory, relaxing this package-private to protected seems reasonable (to me at least).

I also suggest making malloc and free in Memory public, to allow them to be reused from other classes.

Does anybody have any comments about this? I would like to go ahead with my implementation of another class like Memory, but it would be nice if it could be done without us having to maintain a "local" change to JNA in the long term.

Regards,