[sane-devel] typedef int SANE_Word, etc

Julien BLACHE jb at jblache.org
Wed Dec 3 21:37:14 UTC 2008

ABC <abc at telekom.ru> wrote:


> For example
>> > typedef int  SANE_Word;
> It's is int forever on all platforms. And we already have int for that.

Although that's true on all the platforms SANE runs now, it isn't true
for all platforms. Be it for that type or another one.

>> void *SANE_Handle is used to pass an opaque
>> pointer and should be retained.
> Well, it hides its pointer nature.

Opaque types are standard programming practice. It means the actual
structure layout and data are not for your eyes and you shouldn't mess
with it. Mess with it and it's going to blow your foot big time sooner
rather than later, and you've been warned.


Julien BLACHE                                   <http://www.jblache.org> 
<jb at jblache.org>                                  GPG KeyID 0xF5D65169

More information about the sane-devel mailing list