Hi, I am reading ModuleTurorialv1.pdf, and testing it's code on my psp develop platform.
I am a unix C programmer, and I have never developed on portable device such as PDA or PSP, Now I am confused with a function's C code in this PDF document.
-------------------- code fragement start here ------------
const char*
sv_check_permissions (int client)
{
const char* p;
sceKernelDelayThread (10000);
if (client == 123)
p = "yes";
else
p = "no";
return p;
}
-------------------- code fragement end here ------------
the above is a simple pure export module in that doc, As a C programmer, I know that the pointer p is a AUTO variable, It will be destroied when the function returned, I mean the p will point a Invaild area after the function returned, because p is nether a static pointer nor a heap poniter (use malloc), I worried this may cause the application crash?
why do this is safe in PSP, could someone tell me the reason, thank you!
do I make myself clear?