Iterate over %List/$lb in C
I'm using callin to get global values.
Here's a simple function to get string value from global and return it:
int GetGlobalStr(char *global, CACHE_EXSTRP result)
{
int push = CACHEPUSHGLOBAL(strlen(global), global);
// narg Number of subscript expressions pushed onto the argument stack.
int narg = 0;
// flag - Indicates behavior when global reference is undefined:
// 0 — returns CACHE_ERUNDEF
// 1 — returns CACHE_SUCCESS but the return value is an empty string.
int flag = 1;
int get = CACHEGLOBALGET(narg, flag);
int pop = CACHEPOPEXSTR(result);
return ZF_SUCCESS;
}
I get global value in result successfully. However I need to iterate over $lb. How can I do that?