Add ByRef annotations to the ".info" files generated by the compiler.
[COMPILER] * NEW: Add ByRef annotations to the ".info" files generated by the compiler. The name of "ByRef" method arguments is now prefixed with a '&' character.
This commit is contained in:
parent
f1cc289bfb
commit
f6f7f85f8b
3 changed files with 7 additions and 2 deletions
|
@ -324,14 +324,17 @@ static void export_type(TYPE type, bool scomma)
|
|||
static void export_signature(int nparam, int npmin, PARAM *param, bool vararg)
|
||||
{
|
||||
int i;
|
||||
PARAM *p;
|
||||
|
||||
for (i = 0; i < nparam; i++)
|
||||
{
|
||||
p = ¶m[i];
|
||||
|
||||
if (i == npmin)
|
||||
fprintf(_finfo, "[");
|
||||
|
||||
fprintf(_finfo, "(%s)", get_name(param[i].index));
|
||||
export_type(param[i].type, TRUE);
|
||||
fprintf(_finfo, "(%s%s)", (p->byref ? "&" : ""), get_name(p->index));
|
||||
export_type(p->type, TRUE);
|
||||
}
|
||||
|
||||
if (npmin < nparam)
|
||||
|
|
|
@ -166,6 +166,7 @@ static void analyze_function_desc(TRANS_FUNC *func, int flag)
|
|||
|
||||
if (PATTERN_is(*look, RS_AT) || PATTERN_is(*look, RS_BYREF))
|
||||
{
|
||||
param->byref = TRUE;
|
||||
func->byref |= byref_mask;
|
||||
look++;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ typedef
|
|||
PATTERN *optional;
|
||||
short value;
|
||||
unsigned ignore : 1;
|
||||
unsigned byref : 1;
|
||||
}
|
||||
TRANS_PARAM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue