Loading

Paste #pscscvymr

  1. Index: src/script/api/script_text.hpp
  2. ===================================================================
  3. --- src/script/api/script_text.hpp  (revision 27543)
  4. +++ src/script/api/script_text.hpp  (working copy)
  5. @@ -124,7 +124,10 @@
  6.     ScriptText *AddParam(Object value);
  7.  #endif /* DOXYGEN_API */
  8.  
  9. -   /* virtual */ const char *GetEncodedText();
  10. +   /**
  11. +    * @api -all
  12. +    */
  13. +   virtual const char *GetEncodedText();
  14.  
  15.  private:
  16.     StringID string;
  17. Index: src/script/api/squirrel_export.awk
  18. ===================================================================
  19. --- src/script/api/squirrel_export.awk  (revision 27543)
  20. +++ src/script/api/squirrel_export.awk  (working copy)
  21. @@ -81,7 +81,6 @@
  22.     struct_size = 0
  23.     method_size = 0
  24.     static_method_size = 0
  25. -   virtual_class = "false"
  26.     cls = ""
  27.     start_squirrel_define_on_next_line = "false"
  28.     cls_level = 0
  29. @@ -97,7 +96,6 @@
  30.     struct_size = 0
  31.     method_size = 0
  32.     static_method_size = 0
  33. -   virtual_class = "false"
  34.     super_cls = ""
  35.     cls = ""
  36.     api_selected = ""
  37. @@ -340,7 +338,7 @@
  38.     } else {
  39.         print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");"
  40.     }
  41. -   if (virtual_class == "false" && super_cls != "ScriptEvent") {
  42. +   if (super_cls != "ScriptEvent") {
  43.         if (cls_param[2] == "v") {
  44.             print " SQ" api_cls ".AddSQAdvancedConstructor(engine);"
  45.         } else {
  46. @@ -409,22 +407,21 @@
  47.     }
  48.     if (static_method_size != 0) print ""
  49.  
  50. -   if (virtual_class == "false") {
  51. -       # Non-static methods
  52. -       mlen = 0
  53. -       for (i = 1; i <= method_size; i++) {
  54. -           if (mlen <= length(methods[i, 0])) mlen = length(methods[i, 0])
  55. +   # Non-static methods
  56. +   mlen = 0
  57. +   for (i = 1; i <= method_size; i++) {
  58. +       if (mlen <= length(methods[i, 0])) mlen = length(methods[i, 0])
  59. +   }
  60. +   for (i = 1; i <= method_size; i++) {
  61. +       if (methods[i, 2] == "v") {
  62. +           print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\""  methods[i, 0] "\");"
  63. +       } else {
  64. +           print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\""  methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");"
  65.         }
  66. -       for (i = 1; i <= method_size; i++) {
  67. -           if (methods[i, 2] == "v") {
  68. -               print " SQ" api_cls ".DefSQAdvancedMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0]) - 8) "\""  methods[i, 0] "\");"
  69. -           } else {
  70. -               print " SQ" api_cls ".DefSQMethod(engine, &" cls "::" methods[i, 0] ", " substr(spaces, 1, mlen - length(methods[i, 0])) "\""  methods[i, 0] "\", " substr(spaces, 1, mlen - length(methods[i, 0])) "" methods[i, 1] ", \"" methods[i, 2] "\");"
  71. -           }
  72. -           delete methods[i]
  73. -       }
  74. -       if (method_size != 0) print ""
  75. +       delete methods[i]
  76.     }
  77. +   if (method_size != 0) print ""
  78. +
  79.     print " SQ" api_cls ".PostRegister(engine);"
  80.     print "}"
  81.  
  82. @@ -489,9 +486,6 @@
  83.     }
  84.  
  85.     is_static = match($0, "static")
  86. -   if (match($0, "virtual")) {
  87. -       virtual_class = "true"
  88. -   }
  89.     gsub("\\yvirtual\\y", "", $0)
  90.     gsub("\\ystatic\\y", "", $0)
  91.     gsub("\\yconst\\y", "", $0)
  92.  

Comments