[tcltk-perl] Re: What version of perl is required?
Brought to you by:
hobbs
From: Jan D. <ja...@Ac...> - 2004-04-14 23:32:51
|
Gisle posted the following patch earlier today (before I subscribed to the list): Index: users/gisle/hacks/Tcl/Tcl.xs --- users/gisle/hacks/Tcl/Tcl.xs.~1~ Wed Apr 14 11:58:30 2004 +++ users/gisle/hacks/Tcl/Tcl.xs Wed Apr 14 11:58:30 2004 @@ -15,6 +15,17 @@ #include "perl.h" #include "XSUB.h" +#ifndef dTHX + #define dTHX ; + #define pTHX_ + #define aTHX_ +#endif The definition of dTHX is not robust. You should use something like this: #define dTHX extern int Perl___notused without the trailing semicolon. Otherwise code breaks if dTHX is followed by more variable declarations: int foo(pTHX_ int arg) { dTHX; int bar; /* ... */ } The definition above is also what perl.h generates for current Perl when you are not using PERL_IMPLICIT_CONTEXT. Cheers, -Jan |