Re: [AD] Proposed changes for Allegro 5 (6?) |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Shawn Hargreaves wrote:
Bob writes: >>> - `bmp_read8()' & co currently use longs instead of pointers. >> >> The thinking behind using longs is that this makes the pointers >> opaque, ie. can't be dereferenced directly by the user > > Those functions are of the fairly advanced level, so I don't > see users who haven't understood pointers use them :) The problem is not so much programmer ignorance, as portability.
[snip - explication] Ah, I see now what you meant.I like the 'typedef void* bitmap_ptr' idea though, and it seems to 'fix' what was wrong with having a regular point. If this ok with you?
Of course, users can still cast back to chart/short/int, just like they can cast the int to a pointer and read/write from there.
Examples of how to make proper use of the functions should be in the documentation, instead of the example programs :)
-- - Robert J Ohannessian "Microsoft code is probably O(n^20)" (my CS prof) http://pages.infinit.net/voidstar/
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |