From 8108d3f914c33fd0ed8e7a12eb0f01bae8381f71 Mon Sep 17 00:00:00 2001
From: Per Hedbor <ph@opera.com>
Date: Sun, 7 Nov 1999 05:49:00 +0100
Subject: [PATCH] Added comment regarging type parsing (and generation of
 ADD_FUNCTION() instead of add_function(), would speed things up somewhat,
 since there is more than 3000 functions added. :-)

Rev: src/post_modules/GTK/build_pgtk.pike:1.3
---
 src/post_modules/GTK/build_pgtk.pike | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/post_modules/GTK/build_pgtk.pike b/src/post_modules/GTK/build_pgtk.pike
index ced14ada48..83b00f4132 100755
--- a/src/post_modules/GTK/build_pgtk.pike
+++ b/src/post_modules/GTK/build_pgtk.pike
@@ -132,18 +132,21 @@ void emit_program_block(mapping block, string cl)
   foreach(sort(indices(block)), string f)
   {
     _num_functions++;
+
+    // TODO: Add real type parser here, and generade ADD_FUNCTION instead
+    // of add function
     if( search( block[f], "()" ) != -1 ||
-         search( block[f], "(:" ) != -1 ||
+        search( block[f], "(:" ) != -1 ||
         search( block[f], ":)" ) != -1 ||
         search( block[f], " " ) != -1 ||
-        sizeof(block[f]/")") != sizeof( block[f] / "(" ) ||
+        (sizeof(block[f]/")") != sizeof( block[f] / "(" )) ||
         ((sizeof(block[f]/")") != sizeof( block[f] / ":" )+
           sizeof(block[f]/"array")-1) &&
          (sizeof(block[f]/")") != sizeof( block[f] / ":" )) ) ||
         search( block[f], "function" ) == -1)
-    {
+      if( block[f] != "\"function(array:object)\"" )
         werror(lines[cl+f]+": Warning: suspicious type "+block[f]+"\n");
-    }      
+
     switch(f)
     {
      case "union":
-- 
GitLab