12 Aug 09:38
Wrapping unions
From: Paolo Redaelli <paolo.redaelli <at> poste.it>
Subject: Wrapping unions
Newsgroups: gmane.comp.lang.eiffel.smalleiffel
Date: 2008-08-12 07:41:30 GMT
Expires: This article expires on 2008-08-26
Subject: Wrapping unions
Newsgroups: gmane.comp.lang.eiffel.smalleiffel
Date: 2008-08-12 07:41:30 GMT
Expires: This article expires on 2008-08-26
Are unions accessible like structures using externals?
For example:
#include <stdlib.h>
union unione {
int intero;
void *puntatore;
};
union unione *get_unione () {
return (union unione *) malloc(sizeof(union unione));
};
could be accessed with?
intero (ptr: POINTER): INTEGER is
external "[
C union unione get intero use "unione.h"
]"
end
puntatore (ptr: POINTER): POINTER is
external "[
C union unione get puntatore use "unione.h"
]"
end
As far as I can say it is not possible.
I know that I circumvent the problem writing come C macros or inline
(Continue reading)
RSS Feed