unoidl2

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/unoidl2.git/
Log | Files | Refs

commit 8d100ebbd8b75892d1fa991a1cd226e37a32859b
parent f991965abc97f8ec33e4ebe7a6c324dcffdbe805
Author: Tomas Hlavaty <tom@logand.com>
Date:   Mon, 16 Jan 2012 19:41:59 +0100

resolve_typedef introduced

Diffstat:
Munoidl2java.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/unoidl2java.c b/unoidl2java.c @@ -519,6 +519,8 @@ static Any find(Any e, Any l, int (*eq)(Any e, Any x)) { return NIL; } +static Any resolve_typedef(Any x) {return find(x, typedefs, equal);} + static Any reverse(Any x, Any a) { return null(x) ? a : reverse(cdr(x), cons(car(x), a)); } @@ -528,13 +530,13 @@ static void pr_relative(Any x) { pr("java.lang.Object"); else { if(null(cddr(x))) { // local typedef - Any y = find(cons(cadr(x), module), typedefs, equal); + Any y = resolve_typedef(cons(cadr(x), module)); if(!null(y)) { pp(cdr(y)); return; } } - Any y = find(reverse(cdr(x), NIL), typedefs, equal); + Any y = resolve_typedef(reverse(cdr(x), NIL)); if(!null(y)) { // non-local typedef Any a = car(y); // (ServiceContextList iop corba star sun com) Any d = cdr(y); // (sequence (relative ServiceContext)) @@ -555,7 +557,7 @@ static void pr_absolute(Any x) { if(!use_XInterface && equal(com_sun_star_uno_XInterface, cdr(x))) pr("java.lang.Object"); else { - Any y = find(reverse(cdr(x), NIL), typedefs, equal); + Any y = resolve_typedef(reverse(cdr(x), NIL)); if(!null(y)) { // non-local typedef Any a = car(y); // (ServiceContextList iop corba star sun com) Any d = cdr(y); // (sequence (relative ServiceContext))