[DGD] Allow Function to be called within Create

Michael McKiel crashnbrn71 at yahoo.ca
Wed Mar 10 04:27:22 CET 2004


I've come up with the following resolution to allowing a function to only be
called within a given objects create() which works, just wondering if there
is a better way or not :)

void someFunc()
{
    mixed **trace;
    int i, j;
    trace = call_trace();
    for (i=0; i<sizeof(trace); i++)
    {
        if (sizeof(trace[i] & ({ "_F_create" })) != 0)
        {
            /* Allow the function to perform its task */
            return;
        }
    }
}

Also I wasn't sure if where the _F_create within the stack trace was static,
I would think it would differ if the object was compiled/created by a wizard
or by the driver in startup.

Zam.

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list