]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala-0.5.2 emigration
authorFlorian Brosch <flobrosch@src.gnome.org>
Thu, 4 Dec 2008 15:34:14 +0000 (15:34 +0000)
committerFlorian Brosch <flobrosch@src.gnome.org>
Thu, 4 Dec 2008 15:34:14 +0000 (15:34 +0000)
svn path=/trunk/; revision=21

src/libvaladoc/doctree.vala
src/valadoc/valadoc.vala

index 4d0099328a683c3c842ff3d92ab9267f3a94bcae..ea25bfb8b9fd0f884f8a2114629be496897bd809 100755 (executable)
@@ -1040,9 +1040,9 @@ public interface Valadoc.ConstructionMethodHandler : DataType, MethodHandler {
        protected void add_methods_and_construction_methods ( Gee.Collection<Vala.Method> vmethods ) {
                foreach ( Vala.Method vm in vmethods ) {
                        if ( vm is Vala.CreationMethod ) {
-                               if ( ((Vala.CreationMethod)vm).generated == false ) {
+                               //if ( ((Vala.CreationMethod)vm).generated == false ) {
                                        this.add_construction_method ( (Vala.CreationMethod)vm );
-                               }
+                               //}
                        }
                        else {
                                this.add_method ( vm );
@@ -1432,8 +1432,8 @@ public interface Valadoc.FieldHandler : Basic {
 
        // internal
        public void add_field ( Vala.Field vf ) {
-               if ( vf.generated == true )
-                       return ;
+               //if ( vf.generated == true )
+               //      return ;
 
                var tmp = new Field ( this.settings, vf, this, this.head );
                this.fields.add ( tmp );
@@ -1938,15 +1938,15 @@ public class Valadoc.TypeReference : Basic {
                if ( vtype is Vala.ErrorType ) {
                        Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtype).error_domain;                
                        if ( verrdom != null )
-                               this.data_type = this.head.search_vala_symbol ( verrdom );
+                               this.data_type = (DataType?)this.head.search_vala_symbol ( verrdom );
                        else
                                this.data_type = glib_error;
                }
                else if (vtype is Vala.DelegateType ) {
-                       this.data_type = this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol );
+                       this.data_type = (DataType?)this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol );
                }
                else {
-                       this.data_type = this.head.search_vala_symbol ( vtype.data_type );
+                       this.data_type = (DataType?)this.head.search_vala_symbol ( vtype.data_type );
                }
        }
        public void write ( Langlet langlet, void* ptr ) {
@@ -2030,6 +2030,7 @@ public class Valadoc.FormalParameter : Basic, TypeHandler {
                this.set_ret_type ( vformparam );
 
                var def = this.vformalparam.default_expression;
+               /*
                if ( def != null ) {
                        if ( def is Vala.StringLiteral )
                                this.default_value = def.to_string;
@@ -2046,6 +2047,7 @@ public class Valadoc.FormalParameter : Basic, TypeHandler {
                        else
                                this.default_value = def.to_string;
                }
+               */
        }
 
        public TypeReference type_reference {
@@ -2253,7 +2255,7 @@ public class Valadoc.Property : Basic, SymbolAccessibility, ReturnTypeHandler, V
        public void set_type_references ( ) {
                if ( this.is_override ) {
                        Vala.Property vp = ( this.vproperty.base_property == null )? this.vproperty.base_interface_property : this.vproperty.base_property;
-                       this.base_property = this.head.search_vala_symbol ( vp );
+                       this.base_property = (Property?)this.head.search_vala_symbol ( vp );
                }
                this.set_return_type_references ( );
        }
@@ -2548,7 +2550,7 @@ public class Valadoc.Method : Basic, ParameterListHandler, ExceptionHandler, Tem
        public void set_type_references ( ) {
                if ( this.is_override ) {
                        Vala.Method vm = ( this.vmethod.base_method == null )? this.vmethod.base_interface_method : this.vmethod.base_method;
-                       this.base_method = this.head.search_vala_symbol ( vm );
+                       this.base_method = (Method?)this.head.search_vala_symbol ( vm );
                }
 
                this.set_return_type_references ( );
index d92803e6667d1acde839f6ee21b63a4c7eaa1e7b..c478d7d470f80a027bac0e20e54aa884dffa45e3 100755 (executable)
@@ -165,7 +165,8 @@ public class ValaDoc : Object {
                }
                return null;
        }
-*/
+
+
        private void add_files ( Vala.CodeContext context ) {
                foreach ( string source in this.sources ) {
                        if (FileUtils.test (source, FileTest.EXISTS)) {
@@ -190,7 +191,7 @@ public class ValaDoc : Object {
                        }
                }
        }
-
+*/
        // remove
        private Gee.ArrayList<string> sort_sources ( ) {
                var to_doc = new Gee.ArrayList<string>();
@@ -294,52 +295,44 @@ public class ValaDoc : Object {
        }
 
        private bool load_taglets ( string fulldirpath, out Gee.HashMap<string, Type>? taglets2, out Type strtag ) {
-               void* function;
-               GLib.Dir dir;
+               try {
+                       taglets2 = new Gee.HashMap<string, Type> ( GLib.str_hash, GLib.str_equal );
+                       Gee.ArrayList<Module*> modules = new Gee.ArrayList<weak Module*> ( );
+                       string pluginpath = fulldirpath + "taglets/";
+                       GLib.Dir dir = GLib.Dir.open ( pluginpath );
+                       void* function;
 
-               string pluginpath = fulldirpath + "taglets/";
+                       for ( weak string entry = dir.read_name(); entry != null ; entry = dir.read_name() ) {
+                               if ( !( entry.has_suffix(".so") || entry.has_suffix(".dll") ) )
+                                       continue ;
 
-               Gee.ArrayList<Module*> modules = new Gee.ArrayList<weak Module*> ( );
+                               string tagletpath = pluginpath + "/" + entry;
 
+                               Module* module = Module.open ( tagletpath, ModuleFlags.BIND_LAZY);
+                               if (module == null) {
+                                       stdout.printf ( "Can't load plugin.\n" );
+                                       taglets2 = null;
+                                       return false;
+                               }
 
-//             Gee.HashMap<string, Type> taglets =
-                       taglets2 = new Gee.HashMap<string, Type> ( GLib.str_hash, GLib.str_equal );
+                               module->symbol( "register_plugin", out function );
+                               Valadoc.TagletRegisterFunction tagletregisterfkt = (Valadoc.TagletRegisterFunction) function;
 
-               try {
-                       dir = GLib.Dir.open ( pluginpath );
+
+                               GLib.Type type = tagletregisterfkt ( taglets2 );
+
+                               if ( entry == "libtagletstring.so" || entry == "libtagletstring.dll" )
+                                       strtag = type;
+
+                               modules.add ( module );
+                       }
+                       return true;
                }
                catch ( FileError err ) {
                        stdout.printf ( "Can't load plugin. %s\n", pluginpath );
                        taglets2 = null;
                        return false;
                }
-
-               for ( weak string entry = dir.read_name(); entry != null ; entry = dir.read_name() ) {
-                       if ( !( entry.has_suffix(".so") || entry.has_suffix(".dll") ) )
-                               continue ;
-
-                       string tagletpath = pluginpath + "/" + entry;
-
-                       Module* module = Module.open ( tagletpath, ModuleFlags.BIND_LAZY);
-                       if (module == null) {
-                               stdout.printf ( "Can't load plugin.\n" );
-                               taglets2 = null;
-                               return false;
-                       }
-
-                       module->symbol( "register_plugin", out function );
-                       Valadoc.TagletRegisterFunction tagletregisterfkt = (Valadoc.TagletRegisterFunction) function;
-
-
-                       GLib.Type type = tagletregisterfkt ( taglets2 );
-
-                       if ( entry == "libtagletstring.so" || entry == "libtagletstring.dll" )
-                               strtag = type;
-
-                       modules.add ( module );
-               }
-
-               return true;
        }
 
        private Doclet? load_doclet ( string path ) {