FldSetTextPtr(fldP, "Y");
will always be safe.  The reason is that constant strings are stored either:
    in global space
or:
    pc-relative (after the function).

In either case, they'll remain where they were.  There's no need to call
FldDelete or FldInsert.

The problem would be if you did something like:

foo()
{
   char myStringOnStack[] = "abcde";

    FldSetTextPtr(fldP, myStringOnStack);
}

Since myStringOnStack is on the stack, it goes away when foo exits.

So, yes, the pointer you pass to FldSetTextPtr is saved in the field, but if
it's a string constant, it's OK, cause it ain't going anywhere.

Neil

Reply via email to