?
=?iso-8859-1?B?QW5kcuk=?=
Hi all,
Let's say I have the following code:
typedef struct
{
void (*function)();
} TYPE;
void function()
{
printf("The caller structure is...?\n");
}
int main()
{
TYPE x;
TYPE y;
x->function = *function;
y->function = *function;
x.function();
y.function();
}
Is it possible to know where am I calling the function "function" from?
(if it is from the structure x or y?) I don't want to pass x or y as a
argument.
Thank you in advance,
André
Let's say I have the following code:
typedef struct
{
void (*function)();
} TYPE;
void function()
{
printf("The caller structure is...?\n");
}
int main()
{
TYPE x;
TYPE y;
x->function = *function;
y->function = *function;
x.function();
y.function();
}
Is it possible to know where am I calling the function "function" from?
(if it is from the structure x or y?) I don't want to pass x or y as a
argument.
Thank you in advance,
André