vala r1286 - in trunk: . gobject vala vapi/packages/gnome-keyring-1 vapi/packages/gstreamer-0.10 vapi/packages/gtk+-2.0 vapi/packages/libgnome-menu vapi/packages/pango vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1286 - in trunk: . gobject vala vapi/packages/gnome-keyring-1 vapi/packages/gstreamer-0.10 vapi/packages/gtk+-2.0 vapi/packages/libgnome-menu vapi/packages/pango vapigen
- Date: Sun, 20 Apr 2008 14:09:28 +0100 (BST)
Author: juergbi
Date: Sun Apr 20 13:09:27 2008
New Revision: 1286
URL: http://svn.gnome.org/viewvc/vala?rev=1286&view=rev
Log:
2008-04-20 Juerg Billeter <j bitron ch>
* vala/valacfgbuilder.vala, vala/valaclass.vala,
vala/valacodecontext.vala, vala/valainterfacewriter.vala,
vala/valamember.vala, vala/valamemorymanager.vala,
vala/valamethod.vala, vala/valanamespace.vala,
vala/valaparser.vala, vala/valascanner.vala,
vala/valasemanticanalyzer.vala, vala/valasourcefile.vala,
vala/valasymbol.vala, vala/valatokentype.vala,
vala/valatypesymbol.vala, gobject/valaccodecompiler.vala,
gobject/valaccodegenerator.vala, gobject/valagidlwriter.vala,
vapigen/valagidlparser.vala, vapi/packages/gnome-keyring-1/,
vapi/packages/gstreamer-0.10/, vapi/packages/gtk+-2.0/,
vapi/packages/libgnome-menu/, vapi/packages/pango/:
Replace [Import] attribute by `extern' keyword, rename
`is_imported' property to `external' and `pkg' property to
`external_package' to harmonize used terms, fixes bug 480253
Modified:
trunk/ChangeLog
trunk/gobject/valaccodecompiler.vala
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valagidlwriter.vala
trunk/vala/valacfgbuilder.vala
trunk/vala/valaclass.vala
trunk/vala/valacodecontext.vala
trunk/vala/valainterfacewriter.vala
trunk/vala/valamember.vala
trunk/vala/valamemorymanager.vala
trunk/vala/valamethod.vala
trunk/vala/valanamespace.vala
trunk/vala/valaparser.vala
trunk/vala/valascanner.vala
trunk/vala/valasemanticanalyzer.vala
trunk/vala/valasourcefile.vala
trunk/vala/valasymbol.vala
trunk/vala/valatokentype.vala
trunk/vala/valatypesymbol.vala
trunk/vapi/packages/gnome-keyring-1/gnome-keyring-1-custom.vala
trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
trunk/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala
trunk/vapi/packages/libgnome-menu/libgnome-menu-custom.vala
trunk/vapi/packages/pango/pango-custom.vala
trunk/vapigen/valagidlparser.vala
Modified: trunk/gobject/valaccodecompiler.vala
==============================================================================
--- trunk/gobject/valaccodecompiler.vala (original)
+++ trunk/gobject/valaccodecompiler.vala Sun Apr 20 13:09:27 2008
@@ -59,7 +59,7 @@
pc += " gthread-2.0";
}
foreach (string pkg in context.get_packages ()) {
- if (package_exists(pkg))
+ if (package_exists (pkg))
pc += " " + pkg;
}
string pkgflags;
@@ -106,7 +106,7 @@
/* we're only interested in non-pkg source files */
var source_files = context.get_source_files ();
foreach (SourceFile file in source_files) {
- if (!file.pkg) {
+ if (!file.external_package) {
cmdline += " " + Shell.quote (file.get_csource_filename ());
}
}
@@ -126,7 +126,7 @@
/* remove generated C source and header files */
foreach (SourceFile file in source_files) {
- if (!file.pkg) {
+ if (!file.external_package) {
if (!context.save_csources)
FileUtils.unlink (file.get_csource_filename ());
if (!context.save_cheaders)
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Sun Apr 20 13:09:27 2008
@@ -263,7 +263,7 @@
/* we're only interested in non-pkg source files */
var source_files = context.get_source_files ();
foreach (SourceFile file in source_files) {
- if (!file.pkg) {
+ if (!file.external_package) {
file.accept (this);
}
}
Modified: trunk/gobject/valagidlwriter.vala
==============================================================================
--- trunk/gobject/valagidlwriter.vala (original)
+++ trunk/gobject/valagidlwriter.vala Sun Apr 20 13:09:27 2008
@@ -63,7 +63,7 @@
}
public override void visit_namespace (Namespace ns) {
- if (ns.pkg) {
+ if (ns.external_package) {
return;
}
@@ -85,7 +85,7 @@
}
public override void visit_class (Class cl) {
- if (cl.source_reference != null && cl.source_reference.file.pkg) {
+ if (cl.external_package) {
return;
}
@@ -143,7 +143,7 @@
}
public override void visit_struct (Struct st) {
- if (st.source_reference != null && st.source_reference.file.pkg) {
+ if (st.external_package) {
return;
}
@@ -164,7 +164,7 @@
}
public override void visit_interface (Interface iface) {
- if (iface.source_reference != null && iface.source_reference.file.pkg) {
+ if (iface.external_package) {
return;
}
@@ -211,7 +211,7 @@
}
public override void visit_enum (Enum en) {
- if (en.source_reference != null && en.source_reference.file.pkg) {
+ if (en.external_package) {
return;
}
@@ -238,7 +238,7 @@
}
public override void visit_error_domain (ErrorDomain edomain) {
- if (edomain.source_reference != null && edomain.source_reference.file.pkg) {
+ if (edomain.external_package) {
return;
}
@@ -264,7 +264,7 @@
}
public override void visit_constant (Constant c) {
- if (c.source_reference != null && c.source_reference.file.pkg) {
+ if (c.external_package) {
return;
}
@@ -277,7 +277,7 @@
}
public override void visit_field (Field f) {
- if (f.source_reference != null && f.source_reference.file.pkg) {
+ if (f.external_package) {
return;
}
@@ -347,7 +347,7 @@
}
public override void visit_delegate (Delegate cb) {
- if (cb.source_reference != null && cb.source_reference.file.pkg) {
+ if (cb.external_package) {
return;
}
@@ -370,7 +370,7 @@
}
public override void visit_method (Method m) {
- if (m.source_reference != null && m.source_reference.file.pkg) {
+ if (m.external_package) {
return;
}
@@ -399,7 +399,7 @@
}
public override void visit_creation_method (CreationMethod m) {
- if (m.source_reference != null && m.source_reference.file.pkg) {
+ if (m.external_package) {
return;
}
Modified: trunk/vala/valacfgbuilder.vala
==============================================================================
--- trunk/vala/valacfgbuilder.vala (original)
+++ trunk/vala/valacfgbuilder.vala Sun Apr 20 13:09:27 2008
@@ -88,7 +88,7 @@
/* we're only interested in non-pkg source files */
var source_files = context.get_source_files ();
foreach (SourceFile file in source_files) {
- if (!file.pkg) {
+ if (!file.external_package) {
file.accept (this);
}
}
Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala (original)
+++ trunk/vala/valaclass.vala Sun Apr 20 13:09:27 2008
@@ -264,7 +264,7 @@
prop.this_parameter = new FormalParameter ("this", new ClassType (this));
prop.scope.add (prop.this_parameter.name, prop.this_parameter);
- if (!no_field && source_reference != null && !source_reference.file.pkg) {
+ if (!no_field && !external_package) {
bool empty_get = (prop.get_accessor != null && prop.get_accessor.body == null);
bool empty_set = (prop.set_accessor != null && prop.set_accessor.body == null);
Modified: trunk/vala/valacodecontext.vala
==============================================================================
--- trunk/vala/valacodecontext.vala (original)
+++ trunk/vala/valacodecontext.vala Sun Apr 20 13:09:27 2008
@@ -233,7 +233,7 @@
/* find cycles in dependencies between source files */
foreach (SourceFile file in source_files) {
/* we're only interested in internal source files */
- if (file.pkg) {
+ if (file.external_package) {
continue;
}
@@ -255,7 +255,7 @@
*/
foreach (SourceFile file2 in source_files) {
/* we're only interested in internal source files */
- if (file2.pkg) {
+ if (file2.external_package) {
continue;
}
Modified: trunk/vala/valainterfacewriter.vala
==============================================================================
--- trunk/vala/valainterfacewriter.vala (original)
+++ trunk/vala/valainterfacewriter.vala Sun Apr 20 13:09:27 2008
@@ -60,7 +60,7 @@
}
public override void visit_namespace (Namespace ns) {
- if (ns.pkg) {
+ if (ns.external_package) {
return;
}
@@ -85,7 +85,7 @@
}
public override void visit_class (Class cl) {
- if (cl.source_reference != null && cl.source_reference.file.pkg) {
+ if (cl.external_package) {
return;
}
@@ -178,7 +178,7 @@
}
public override void visit_struct (Struct st) {
- if (st.source_reference != null && st.source_reference.file.pkg) {
+ if (st.external_package) {
return;
}
@@ -220,7 +220,7 @@
}
public override void visit_interface (Interface iface) {
- if (iface.source_reference != null && iface.source_reference.file.pkg) {
+ if (iface.external_package) {
return;
}
@@ -290,7 +290,7 @@
}
public override void visit_enum (Enum en) {
- if (en.source_reference != null && en.source_reference.file.pkg) {
+ if (en.external_package) {
return;
}
@@ -359,7 +359,7 @@
}
public override void visit_error_domain (ErrorDomain edomain) {
- if (edomain.source_reference != null && edomain.source_reference.file.pkg) {
+ if (edomain.external_package) {
return;
}
@@ -401,7 +401,7 @@
}
public override void visit_constant (Constant c) {
- if (c.source_reference != null && c.source_reference.file.pkg) {
+ if (c.external_package) {
return;
}
@@ -422,7 +422,7 @@
}
public override void visit_field (Field f) {
- if (f.source_reference != null && f.source_reference.file.pkg) {
+ if (f.external_package) {
return;
}
@@ -542,7 +542,7 @@
}
public override void visit_delegate (Delegate cb) {
- if (cb.source_reference != null && cb.source_reference.file.pkg) {
+ if (cb.external_package) {
return;
}
@@ -587,7 +587,7 @@
}
public override void visit_method (Method m) {
- if (m.source_reference != null && m.source_reference.file.pkg) {
+ if (m.external_package) {
return;
}
Modified: trunk/vala/valamember.vala
==============================================================================
--- trunk/vala/valamember.vala (original)
+++ trunk/vala/valamember.vala Sun Apr 20 13:09:27 2008
@@ -40,7 +40,7 @@
add_cheader_filename (filename);
}
- if (cheader_filenames.size == 0 && source_reference != null && !source_reference.file.pkg) {
+ if (cheader_filenames.size == 0 && source_reference != null && !external_package) {
// don't add default include directives for VAPI files
cheader_filenames.add (source_reference.file.get_cinclude_filename ());
}
Modified: trunk/vala/valamemorymanager.vala
==============================================================================
--- trunk/vala/valamemorymanager.vala (original)
+++ trunk/vala/valamemorymanager.vala Sun Apr 20 13:09:27 2008
@@ -58,7 +58,7 @@
}
public override void visit_source_file (SourceFile source_file) {
- if (!source_file.pkg) {
+ if (!source_file.external_package) {
source_file.accept_children (this);
}
}
Modified: trunk/vala/valamethod.vala
==============================================================================
--- trunk/vala/valamethod.vala (original)
+++ trunk/vala/valamethod.vala Sun Apr 20 13:09:27 2008
@@ -374,8 +374,6 @@
no_array_length = true;
} else if (a.name == "PrintfFormat") {
printf_format = true;
- } else if (a.name == "Import") {
- is_imported = true;
}
}
}
Modified: trunk/vala/valanamespace.vala
==============================================================================
--- trunk/vala/valanamespace.vala (original)
+++ trunk/vala/valanamespace.vala Sun Apr 20 13:09:27 2008
@@ -27,11 +27,6 @@
* Represents a namespace declaration in the source code.
*/
public class Vala.Namespace : Symbol {
- /**
- * Specifies whether this namespace is only used in a VAPI package file.
- */
- public bool pkg { get; set; }
-
private Gee.List<Class> classes = new ArrayList<Class> ();
private Gee.List<Interface> interfaces = new ArrayList<Interface> ();
private Gee.List<Struct> structs = new ArrayList<Struct> ();
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Sun Apr 20 13:09:27 2008
@@ -52,10 +52,11 @@
NONE,
ABSTRACT = 1 << 0,
CLASS = 1 << 1,
- INLINE = 1 << 2,
- OVERRIDE = 1 << 3,
- STATIC = 1 << 4,
- VIRTUAL = 1 << 5
+ EXTERN = 1 << 2,
+ INLINE = 1 << 3,
+ OVERRIDE = 1 << 4,
+ STATIC = 1 << 5,
+ VIRTUAL = 1 << 6
}
construct {
@@ -186,6 +187,7 @@
case TokenType.ENUM:
case TokenType.ENSURES:
case TokenType.ERRORDOMAIN:
+ case TokenType.EXTERN:
case TokenType.FALSE:
case TokenType.FINALLY:
case TokenType.FOR:
@@ -1751,6 +1753,7 @@
case TokenType.DELEGATE:
case TokenType.ENUM:
case TokenType.ERRORDOMAIN:
+ case TokenType.EXTERN:
case TokenType.INLINE:
case TokenType.INTERFACE:
case TokenType.NAMESPACE:
@@ -1792,7 +1795,6 @@
expect (TokenType.NAMESPACE);
var sym = parse_symbol_name ();
var ns = new Namespace (sym.name, get_src_com (begin));
- ns.pkg = scanner.source_file.pkg;
set_attributes (ns, attrs);
parse_declarations (ns);
return ns;
@@ -1805,8 +1807,8 @@
// merge if namespace already exists
var old_ns = (Namespace) ns.scope.lookup (sym.name);
var new_ns = (Namespace) sym;
- if (!new_ns.pkg) {
- old_ns.pkg = false;
+ if (old_ns.external_package && !new_ns.external_package) {
+ old_ns.source_reference = new_ns.source_reference;
}
foreach (Class cl in new_ns.get_classes ()) {
if (old_ns.scope.lookup (cl.name) is Class) {
@@ -1938,7 +1940,7 @@
parse_declarations (cl);
// ensure there is always a default construction method
- if (!scanner.source_file.pkg
+ if (!scanner.source_file.external_package
&& !cl.is_static
&& cl.default_construction_method == null) {
var m = new CreationMethod (cl.name, null, cl.source_reference);
@@ -1952,7 +1954,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, cl.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2094,6 +2095,9 @@
if (ModifierFlags.INLINE in flags) {
method.is_inline = true;
}
+ if (ModifierFlags.EXTERN in flags) {
+ method.external = true;
+ }
expect (TokenType.OPEN_PARENS);
if (current () != TokenType.CLOSE_PARENS) {
do {
@@ -2265,7 +2269,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, st.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2317,7 +2320,7 @@
}
if (accept (TokenType.SEMICOLON)) {
- iface.is_imported = true;
+ iface.external = true;
iface.declaration_only = true;
} else {
parse_declarations (iface);
@@ -2327,7 +2330,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, iface.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2408,7 +2410,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, en.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2463,7 +2464,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, ed.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2499,6 +2499,10 @@
next ();
flags |= ModifierFlags.ABSTRACT;
break;
+ case TokenType.EXTERN:
+ next ();
+ flags |= ModifierFlags.EXTERN;
+ break;
case TokenType.STATIC:
next ();
flags |= ModifierFlags.STATIC;
@@ -2522,6 +2526,10 @@
next ();
flags |= ModifierFlags.CLASS;
break;
+ case TokenType.EXTERN:
+ next ();
+ flags |= ModifierFlags.EXTERN;
+ break;
case TokenType.INLINE:
next ();
flags |= ModifierFlags.INLINE;
@@ -2659,7 +2667,6 @@
while (sym.inner != null) {
sym = sym.inner;
var ns = new Namespace (sym.name, d.source_reference);
- ns.pkg = scanner.source_file.pkg;
if (result is Namespace) {
ns.add_namespace ((Namespace) result);
} else {
@@ -2769,6 +2776,7 @@
case TokenType.DELEGATE:
case TokenType.ENUM:
case TokenType.ERRORDOMAIN:
+ case TokenType.EXTERN:
case TokenType.INLINE:
case TokenType.INTERFACE:
case TokenType.NAMESPACE:
Modified: trunk/vala/valascanner.vala
==============================================================================
--- trunk/vala/valascanner.vala (original)
+++ trunk/vala/valascanner.vala Sun Apr 20 13:09:27 2008
@@ -185,6 +185,9 @@
case 'd':
if (matches (begin, "delete")) return TokenType.DELETE;
break;
+ case 'e':
+ if (matches (begin, "extern")) return TokenType.EXTERN;
+ break;
case 'i':
if (matches (begin, "inline")) return TokenType.INLINE;
break;
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Sun Apr 20 13:09:27 2008
@@ -174,7 +174,7 @@
}
/* VAPI classes don't have to specify overridden methods */
- if (!cl.source_reference.file.pkg) {
+ if (!cl.external_package) {
/* all abstract symbols defined in base types have to be at least defined (or implemented) also in this type */
foreach (DataType base_type in cl.get_base_types ()) {
if (base_type.data_type is Interface) {
@@ -323,7 +323,7 @@
public override void visit_constant (Constant c) {
c.type_reference.accept (this);
- if (!current_source_file.pkg) {
+ if (!c.external_package) {
if (c.initializer == null) {
c.error = true;
Report.error (c.source_reference, "A const field requires a initializer to be provided");
@@ -413,7 +413,7 @@
if (current_symbol is Class) {
/* VAPI classes don't specify overridden methods */
- if (!current_symbol.source_reference.file.pkg) {
+ if (!current_symbol.external_package) {
if (!(m is CreationMethod)) {
find_base_interface_method (m, (Class) current_symbol);
if (m.is_virtual || m.overrides) {
@@ -689,7 +689,7 @@
var cl = (Class) prop.parent_symbol;
/* VAPI classes don't specify overridden properties */
- if (!cl.source_reference.file.pkg) {
+ if (!cl.external_package) {
find_base_interface_property (prop, cl);
if (prop.is_virtual || prop.overrides) {
find_base_class_property (prop, cl);
@@ -720,7 +720,7 @@
current_return_type = new VoidType ();
}
- if (!acc.source_reference.file.pkg) {
+ if (!acc.prop.external_package) {
if (acc.body == null && !acc.prop.interface_only && !acc.prop.is_abstract) {
/* no accessor body specified, insert default body */
Modified: trunk/vala/valasourcefile.vala
==============================================================================
--- trunk/vala/valasourcefile.vala (original)
+++ trunk/vala/valasourcefile.vala Sun Apr 20 13:09:27 2008
@@ -40,7 +40,7 @@
/**
* Specifies whether this file is a VAPI package file.
*/
- public bool pkg { get; set; }
+ public bool external_package { get; set; }
/**
* Specifies the dependency cycle this source file is member of. If this
@@ -98,7 +98,7 @@
*/
public SourceFile (CodeContext context, string filename, bool pkg = false) {
this.filename = filename;
- this.pkg = pkg;
+ this.external_package = pkg;
this.context = context;
}
@@ -231,7 +231,7 @@
* @param dep_type type of dependency
*/
public void add_symbol_dependency (Symbol? sym, SourceFileDependencyType dep_type) {
- if (pkg) {
+ if (external_package) {
return;
}
@@ -255,7 +255,7 @@
}
if (dep_type == SourceFileDependencyType.SOURCE) {
- if (s.source_reference.file.pkg) {
+ if (s.external_package) {
foreach (string fn in s.get_cheader_filenames ()) {
source_external_includes.add (fn);
}
@@ -267,7 +267,7 @@
return;
}
- if (s.source_reference.file.pkg) {
+ if (s.external_package) {
/* external package */
foreach (string fn in s.get_cheader_filenames ()) {
header_external_includes.add (fn);
Modified: trunk/vala/valasymbol.vala
==============================================================================
--- trunk/vala/valasymbol.vala (original)
+++ trunk/vala/valasymbol.vala Sun Apr 20 13:09:27 2008
@@ -94,16 +94,33 @@
public Scope scope {
get { return _scope; }
}
-
+
+ /**
+ * Specifies whether the implementation is external, for example in
+ * a separate C source file or in an external library.
+ */
+ public bool external {
+ get {
+ return _external || (parent_symbol != null && parent_symbol.external)
+ || external_package;
+ }
+ set { _external = value; }
+ }
+
/**
- * Specifies whether this is an imported symbol e.g. the Import
- * attribute has been set.
+ * Specifies whether the implementation is in an external library.
*/
- public bool is_imported { get; set; }
+ public bool external_package {
+ get {
+ return (source_reference != null && source_reference.file.external_package);
+ }
+ }
private weak Scope _owner;
private Scope _scope;
+ private bool _external;
+
construct {
_scope = new Scope (this);
active = true;
Modified: trunk/vala/valatokentype.vala
==============================================================================
--- trunk/vala/valatokentype.vala (original)
+++ trunk/vala/valatokentype.vala Sun Apr 20 13:09:27 2008
@@ -65,6 +65,7 @@
ENSURES,
ERRORDOMAIN,
EOF,
+ EXTERN,
FALSE,
FINALLY,
FOR,
Modified: trunk/vala/valatypesymbol.vala
==============================================================================
--- trunk/vala/valatypesymbol.vala (original)
+++ trunk/vala/valatypesymbol.vala Sun Apr 20 13:09:27 2008
@@ -198,7 +198,7 @@
add_cheader_filename (filename);
}
- if (cheader_filenames.size == 0 && source_reference != null && !source_reference.file.pkg) {
+ if (cheader_filenames.size == 0 && source_reference != null && !external_package) {
// don't add default include directives for VAPI files
cheader_filenames.add (source_reference.file.get_cinclude_filename ());
}
Modified: trunk/vapi/packages/gnome-keyring-1/gnome-keyring-1-custom.vala
==============================================================================
--- trunk/vapi/packages/gnome-keyring-1/gnome-keyring-1-custom.vala (original)
+++ trunk/vapi/packages/gnome-keyring-1/gnome-keyring-1-custom.vala Sun Apr 20 13:09:27 2008
@@ -5,8 +5,7 @@
[CCode (free_function = "gnome_keyring_attribute_list_free")]
public class AttributeList {
- [Import]
- public Attribute index (int i);
+ public extern Attribute index (int i);
[NoArrayLength]
public Attribute[] data;
Modified: trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
==============================================================================
--- trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala (original)
+++ trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala Sun Apr 20 13:09:27 2008
@@ -21,6 +21,5 @@
*/
namespace Gst {
- [Import]
- public void init ([CCode (array_length_pos = 0.9)] ref string[] args);
+ public extern void init ([CCode (array_length_pos = 0.9)] ref string[] args);
}
Modified: trunk/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala
==============================================================================
--- trunk/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala (original)
+++ trunk/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala Sun Apr 20 13:09:27 2008
@@ -29,20 +29,16 @@
}
public class Widget {
- [Import]
- public Widget (GLib.Type type, ...);
+ public extern Widget (GLib.Type type, ...);
- [Import]
[CCode (cname = "GTK_WIDGET_FLAGS")]
- public WidgetFlags get_flags ();
+ public extern WidgetFlags get_flags ();
- [Import]
[CCode (cname = "GTK_WIDGET_SET_FLAGS")]
- public void set_flags (WidgetFlags flags);
+ public extern void set_flags (WidgetFlags flags);
- [Import]
[CCode (cname = "GTK_WIDGET_UNSET_FLAGS")]
- public void unset_flags (WidgetFlags flags);
+ public extern void unset_flags (WidgetFlags flags);
}
public interface FileChooserEmbed {
Modified: trunk/vapi/packages/libgnome-menu/libgnome-menu-custom.vala
==============================================================================
--- trunk/vapi/packages/libgnome-menu/libgnome-menu-custom.vala (original)
+++ trunk/vapi/packages/libgnome-menu/libgnome-menu-custom.vala Sun Apr 20 13:09:27 2008
@@ -22,8 +22,7 @@
namespace GMenu {
public class TreeItem {
- [Import]
- public TreeItemType get_type ();
+ public extern TreeItemType get_type ();
}
}
Modified: trunk/vapi/packages/pango/pango-custom.vala
==============================================================================
--- trunk/vapi/packages/pango/pango-custom.vala (original)
+++ trunk/vapi/packages/pango/pango-custom.vala Sun Apr 20 13:09:27 2008
@@ -22,7 +22,6 @@
namespace Pango {
public class Language {
- [Import]
- public weak string to_string ();
+ public extern weak string to_string ();
}
}
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Sun Apr 20 13:09:27 2008
@@ -193,7 +193,9 @@
Namespace ns;
if (sym is Namespace) {
ns = (Namespace) sym;
- ns.pkg = false;
+ if (ns.external_package) {
+ ns.source_reference = current_source_reference;
+ }
} else {
ns = new Namespace (module.name, current_source_reference);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]