diff dwt/browser/SimpleEnumerator.d @ 348:9a4d7706df52

Test Update to fix linux XPCOM interface issues
author John Reimer <terminal.node@gmail.com>
date Fri, 31 Oct 2008 21:46:44 -0700
parents 8198e6052012
children
line wrap: on
line diff
--- a/dwt/browser/SimpleEnumerator.d	Wed Oct 29 20:12:27 2008 -0700
+++ b/dwt/browser/SimpleEnumerator.d	Fri Oct 31 21:46:44 2008 -0700
@@ -23,8 +23,6 @@
 import dwt.internal.mozilla.nsISupports;
 
 class SimpleEnumerator : nsISimpleEnumerator{
-//    XPCOMObject supports;
-//    XPCOMObject simpleEnumerator;
     int refCount = 0;
     nsISupports[] values;
     int index = 0;
@@ -34,14 +32,15 @@
     for (int i = 0; i < values.length; i++) {
         values[i].AddRef ();
     }
-    //createCOMInterfaces ();
 }
 
+extern(System)
 nsrefcnt AddRef () {
     refCount++;
     return refCount;
 }
 
+extern(System)
 nsresult QueryInterface (nsID* riid, void** ppvObject) {
     if (riid is null || ppvObject is null) return XPCOM.NS_ERROR_NO_INTERFACE;
     //nsID guid = new nsID ();
@@ -62,18 +61,21 @@
     return XPCOM.NS_ERROR_NO_INTERFACE;
 }
 
+extern(System)
 nsresult Release () {
     refCount--;
     //if (refCount is 0) disposeCOMInterfaces ();
     return refCount;
 }
 
+extern(System)
 nsresult HasMoreElements (PRBool* _retval) {
     bool more = values !is null && index < values.length;
     *_retval = more ? 1 : 0; /*PRBool */
     return XPCOM.NS_OK;
-}   
-    
+}
+
+extern(System)
 nsresult GetNext (nsISupports* _retval) {
     if (values is null || index is values.length) return XPCOM.NS_ERROR_UNEXPECTED;
     nsISupports value = values[index++];