Blob Blame History Raw
--- graphviz-2.20.3/tclpkg/gv/gv.i.orig	2009-02-25 13:44:36.000000000 -0500
+++ graphviz-2.20.3/tclpkg/gv/gv.i	2009-02-25 13:46:29.000000000 -0500
@@ -15,8 +15,22 @@
 **********************************************************/
 
 %module gv
-%{
 
+#ifdef SWIGTCL
+// A typemap telling SWIG to ignore an argument for input
+// However, we still need to pass a pointer to the C function
+%typemap(in,numinputs=0) char *outdata (char *temp) {
+     $1 = &temp;
+}
+// A typemap defining how to return an argument by appending it to the result
+%typemap(argout) char *outdata {
+     Tcl_Obj *o = Tcl_NewStringObj($1);
+     Tcl_ListObjAppendElement(interp,$result,o);
+}
+#endif
+
+
+%{
 /* some language headers (e.g. php.h, ruby.h) leave these defined */
 #undef PACKAGE_BUGREPORT
 #undef PACKAGE_STRING
@@ -371,18 +385,4 @@
 extern bool write(Agraph_t *g, char *filename);
 extern bool write(Agraph_t *g, FILE *f);
 
-
-#ifdef SWIGTCL
-// A typemap telling SWIG to ignore an argument for input
-// However, we still need to pass a pointer to the C function
-%typemap(in,numinputs=0) char *outdata (char *temp) {
-     $1 = &temp;
-}
-// A typemap defining how to return an argument by appending it to the result
-%typemap(argout) char *outdata {
-     Tcl_Obj *o = Tcl_NewStringObj($1);
-     Tcl_ListObjAppendElement(interp,$result,o);
-}
-#endif
-
 %}