The original reason that this arose is now somewhat mitigated by the new undefined opcode, but nevertheless, I think it should probably be resolved. So:
On 27/07/2010 8:32 PM, Michael Whapples wrote:
Michael, how does jlouis handle this inlen/outlen situation? John, how about your JNI bindings? As I understand it, it's not really natural to specify maximum buffer sizes in either language.Firstly I have seen later messages in this thread and agree that it would not be natural for python programs to have to specify the buffer sizes.
So, who is using these bindings? There are three options: 1. Raise the hard-coded output buffer multiplier from 2 to, say, 12. 2. Allow the user to change the output buffer multiplier.3. Use a hard-coded static output buffer size of, say, 1024. According to John, this is how liblouisxml does it, though I don't know what size it uses.
4. Allow the static output buffer size to be changed by the user.If (2) or (4), should this be via a module variable or a keyword argument to each function?
To be honest, I'm leaning towards either (1) or (3). Memory just isn't so much of an issue these days, especially for something which will be freed once complete.
Jamie -- James Teh Vice President NV Access Inc, ABN 61773362390 Email: jamie@xxxxxxxxxxxx Web site: http://www.nvaccess.org/ For a description of the software and to download it go to http://www.jjb-software.com