Thread View: pl.comp.lang.perl
1 messages
1 total messages
Started by Waldek Grudzień
Tue, 10 Feb 1998 09:48
Mapowanie struktur C na struktury w PERL'a
Author: Waldek Grudzień
Date: Tue, 10 Feb 1998 09:48
Date: Tue, 10 Feb 1998 09:48
27 lines
1391 bytes
1391 bytes
Czy ktoś wie może, gdzie mogę znaleźć jakieś przykłady mapowania struktur
C na struktury PERL'a (do wykorzystania w C funkcjach napisanych przy
użyciu XSUB'a).
Chciałbym przykładowo zmapować listę :
struct test {
char id[20];
char nazwa[50];
struct test *następny;
}
na np. tablicę hashów postaci
%test = ( 'id' => '...',
'nazwa' => '...')
Mogłbym to co prawda zrobić pośrednio (mapując poszczególne pola do
tablic, a następnie do hashów), ale może istnieje bardziej "elegancki"
sposób.
Z góry dzięki,
Waldek Grudzien
///////////////////////////////////////////
// http://www.uhc.lublin.pl/~waldekg/ //
// Lublin/Lubartow, Poland //
\\ University Health Care \\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads