Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Improvements to several Lang.cpp functions
|
|
|
|
Re: Improvements to several Lang.cpp functions [message #20399 is a reply to message #20386] |
Tue, 17 March 2009 03:37 |
Novo
Messages: 1371 Registered: December 2006
|
Ultimate Contributor |
|
|
I don't insist on using alloca().
I'm pretty sure alloca() doesn't exist on gaming consoles, but it exists in msvc, glibc (Linux and BSD).
Below is an implementation of alloca(), which I found in GLIBC.
# define alloca(size) __builtin_alloca (size)
#ifndef NO_UNDERSCORES
#define __builtin_alloca ___builtin_alloca
#endif
ENTRY (__builtin_alloca)
sub %sp, %o0, %sp /* Push some stack space. */
retl /* Return; the returned buffer leaves 96 */
add %sp, 96, %o0 /* bytes of register save area at the top. */
END (__builtin_alloca)
IMHO, using of alloca() is just safer and cleaner. But that is completely up to you.
Regards,
Novo
[Updated on: Tue, 17 March 2009 03:38] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Sep 20 07:08:07 CEST 2024
Total time taken to generate the page: 0.03217 seconds
|