Keith Sheppard
2012-Nov-01 01:29 UTC
[LLVMdev] C API: Why do some functions require a string length arg
Hello, Most of the functions in the C api that take a string arg don't require a string length but some do (eg. the somewhat new MD functions). Is there a reason that some functions ask for length? If possible, I'd prefer for the API not to require length for reasons of simplicity and consistency and if it turns out that there is consensus for this change I'm happy to prepare a patch. Best, Keith -- keithsheppard.name -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121031/4cbc0896/attachment.html>
Duncan Sands
2012-Nov-01 07:07 UTC
[LLVMdev] C API: Why do some functions require a string length arg
Hi Keith Sheppard,> Most of the functions in the C api that take a string arg don't require a string > length but some do (eg. the somewhat new MD functions). Is there a reason that > some functions ask for length?presumably it's to support embedded nuls. Ciao, Duncan. If possible, I'd prefer for the API not to> require length for reasons of simplicity and consistency and if it turns out > that there is consensus for this change I'm happy to prepare a patch. > > Best, Keith > > -- > keithsheppard.name <http://keithsheppard.name> > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >