Commit 06a15678 authored by Stephan Herhut's avatar Stephan Herhut
Browse files

fixed a bug in the creation of wrap/unwrap functions

and created the name of a new version for the website
parent 6b8912b5
......@@ -293,7 +293,7 @@ GetUnwrapUdtLinkName (namespace_t *ns, const char *name)
}
/** <!-- ****************************************************************** -->
* @brief Inserts a fundec for <ns>::unwrap<name> into the funs chain and
* @brief Inserts a fundec for <ns>::wrap<name> into the funs chain and
* adds a symbol for that type to the symbols chain.
*
* @param type the actual type
......@@ -325,7 +325,9 @@ BuildWrap (ntype *type, namespace_t *ns, const char *name, node **symbols,
sacargret = TBmakeRet (TYmakeAKS (TYmakeUserType (sacargudt), SHmakeShape (0)), NULL);
sourcearg = TBmakeArg (TBmakeAvis (TRAVtmpVar (), TYcopyType (type)), NULL);
sourcearg = TBmakeArg (TBmakeAvis (TRAVtmpVar (),
TYmakeAUD (TYcopyType (TYgetScalar (type)))),
NULL);
udtarg = TBmakeArg (TBmakeAvis (TRAVtmpVar (), TYmakeAKS (TYmakeSimpleType (T_int),
SHmakeShape (0))),
sourcearg);
......@@ -383,7 +385,7 @@ BuildUnWrap (ntype *type, namespace_t *ns, const char *name, node **symbols,
DBUG_ASSERT ((sacargudt != UT_NOT_DEFINED), "Cannot find sacarg udt!");
destret = TBmakeRet (TYcopyType (type), NULL);
destret = TBmakeRet (TYmakeAUD (TYcopyType (TYgetScalar (type))), NULL);
udtarg = TBmakeArg (TBmakeAvis (TRAVtmpVar (), TYmakeAKS (TYmakeUserType (sacargudt),
SHmakeShape (0))),
......
......@@ -65,7 +65,7 @@ GLOBAL (int, start_token, 0)
* Version control
*/
GLOBAL (const char *, version_id, "v1.00-beta (Jolly Good Fellow)")
GLOBAL (const char *, version_id, "v1.00-beta (Buchette d'Anjou)")
/*
* version string
*/
......
......@@ -284,3 +284,28 @@ TRAVtmpVarName (char *postfix)
DBUG_RETURN (result);
}
#ifndef DBUG_OFF
/** <!-- ****************************************************************** -->
* @fn void TRAVprintStack()
*
* @brief Prints the current traversal stack, iff -#d,TRAVSTACK is set.
* Mainly useful in debuggers...
******************************************************************************/
void
TRAVprintStack ()
{
travstack_t *tmp = travstack;
DBUG_ENTER ("TRAVprintStack");
DBUG_PRINT ("TRAVSTACK", ("Current traversal stack:"));
while (tmp != NULL) {
DBUG_PRINT ("TRAVSTACK", (" %s", travnames[tmp->traversal]));
tmp = tmp->next;
}
DBUG_PRINT ("TRAVSTACK", ("End of traversal stack"));
DBUG_VOID_RETURN;
}
#endif /* DBUG_OFF */
......@@ -20,6 +20,10 @@ extern const char *TRAVgetName ();
extern void TRAVsetPreFun (trav_t traversal, travfun_p prefun);
extern void TRAVsetPostFun (trav_t traversal, travfun_p postfun);
#ifndef DBUG_OFF
extern void TRAVprintStack ();
#endif
extern char *TRAVtmpVar (void);
extern char *TRAVtmpVarName (char *postfix);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment