Manually added HRHTMLRenderingLibAvailable.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 15 May 2000 15:36:52 +0000 (15:36 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 15 May 2000 15:36:52 +0000 (15:36 +0000)
Blacklist HRDisposeReference and call it in the dispose routine.

Mac/Modules/htmlrender/HtmlRendermodule.c
Mac/Modules/htmlrender/htmlscan.py
Mac/Modules/htmlrender/htmlsupport.py

index e521c11cfa45550c77171ede53de677d486ec12b..afd5805776b4b46c8cdc7f4459055a8827813cad 100644 (file)
@@ -755,6 +755,20 @@ static PyObject *Html_HRUtilGetURLFromFSSpec(_self, _args)
        return _res;
 }
 
+static PyObject *Html_HRHTMLRenderingLibAvailable(_self, _args)
+       PyObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       int _rv;
+       if (!PyArg_ParseTuple(_args, ""))
+               return NULL;
+       _rv = HRHTMLRenderingLibAvailable();
+       _res = Py_BuildValue("i",
+                            _rv);
+       return _res;
+}
+
 static PyMethodDef Html_methods[] = {
        {"HRGetHTMLRenderingLibVersion", (PyCFunction)Html_HRGetHTMLRenderingLibVersion, 1,
         "() -> (NumVersion returnVers)"},
@@ -772,6 +786,8 @@ static PyMethodDef Html_methods[] = {
         "(char * rootURL, char * linkURL) -> (FSSpec destSpec)"},
        {"HRUtilGetURLFromFSSpec", (PyCFunction)Html_HRUtilGetURLFromFSSpec, 1,
         "(FSSpec fsspec, Handle urlHandle) -> None"},
+       {"HRHTMLRenderingLibAvailable", (PyCFunction)Html_HRHTMLRenderingLibAvailable, 1,
+        "() -> (int _rv)"},
        {NULL, NULL, 0}
 };
 
index ae31c377500ef26501cc6b9765b0fe40fc167ead..db6285869d0a4cf84b41d833109c937e628f65ce 100644 (file)
@@ -14,7 +14,7 @@ OBJECT = "HRReference"
 
 def main():
 ##     input = LONG + ".h"
-       input = "Macintosh HD:SWdev:Jack:Universal:Interfaces:CIncludes:HTMLRendering.h"
+       input = "Macintosh HD:ufs:jack:SWdev:Universal:Interfaces:CIncludes:HTMLRendering.h"
        output = SHORT + "gen.py"
        defsoutput = TOOLBOXDIR + LONG + ".py"
        scanner = MyScanner(input, output, defsoutput)
@@ -38,6 +38,7 @@ class MyScanner(Scanner):
 
        def makeblacklistnames(self):
                return [
+                       "HRDisposeReference",
                        ]
 
        def makeblacklisttypes(self):
index d4547ca92e9167d26275191baf2678b0c8a8fee8..b8c7eeca37d4c530bce4cb72cbb4f7084510368f 100644 (file)
@@ -143,8 +143,8 @@ class MyObjectDefinition(GlobalObjectDefinition):
 ##             Output("if (v == Py_None) { *p_itself = NULL; return 1; }")
 ##             Output("if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);")
 ##             Output("                      return 1; }")
-##     def outputFreeIt(self, itselfname):
-##             Output("DisposeDialog(%s);", itselfname)
+       def outputFreeIt(self, itselfname):
+               Output("HRDisposeReference(%s);", itselfname)
 
 # Create the generator groups and link them
 module = MacModule('HtmlRender', 'Html', includestuff, finalstuff, initstuff)
@@ -160,6 +160,9 @@ functions = []
 methods = []
 execfile("htmlgen.py")
 
+f = Function(int, 'HRHTMLRenderingLibAvailable')
+functions.append(f)
+
 # add the populated lists to the generator groups
 for f in functions: module.add(f)
 for f in methods: object.add(f)