Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9c01a5

Browse files
committed
Manually added HRHTMLRenderingLibAvailable.
Blacklist HRDisposeReference and call it in the dispose routine.
1 parent 036194c commit d9c01a5

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

Mac/Modules/htmlrender/HtmlRendermodule.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,20 @@ static PyObject *Html_HRUtilGetURLFromFSSpec(_self, _args)
755755
return _res;
756756
}
757757

758+
static PyObject *Html_HRHTMLRenderingLibAvailable(_self, _args)
759+
PyObject *_self;
760+
PyObject *_args;
761+
{
762+
PyObject *_res = NULL;
763+
int _rv;
764+
if (!PyArg_ParseTuple(_args, ""))
765+
return NULL;
766+
_rv = HRHTMLRenderingLibAvailable();
767+
_res = Py_BuildValue("i",
768+
_rv);
769+
return _res;
770+
}
771+
758772
static PyMethodDef Html_methods[] = {
759773
{"HRGetHTMLRenderingLibVersion", (PyCFunction)Html_HRGetHTMLRenderingLibVersion, 1,
760774
"() -> (NumVersion returnVers)"},
@@ -772,6 +786,8 @@ static PyMethodDef Html_methods[] = {
772786
"(char * rootURL, char * linkURL) -> (FSSpec destSpec)"},
773787
{"HRUtilGetURLFromFSSpec", (PyCFunction)Html_HRUtilGetURLFromFSSpec, 1,
774788
"(FSSpec fsspec, Handle urlHandle) -> None"},
789+
{"HRHTMLRenderingLibAvailable", (PyCFunction)Html_HRHTMLRenderingLibAvailable, 1,
790+
"() -> (int _rv)"},
775791
{NULL, NULL, 0}
776792
};
777793

Mac/Modules/htmlrender/htmlscan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def main():
1616
## input = LONG + ".h"
17-
input = "Macintosh HD:SWdev:Jack:Universal:Interfaces:CIncludes:HTMLRendering.h"
17+
input = "Macintosh HD:ufs:jack:SWdev:Universal:Interfaces:CIncludes:HTMLRendering.h"
1818
output = SHORT + "gen.py"
1919
defsoutput = TOOLBOXDIR + LONG + ".py"
2020
scanner = MyScanner(input, output, defsoutput)
@@ -38,6 +38,7 @@ def destination(self, type, name, arglist):
3838

3939
def makeblacklistnames(self):
4040
return [
41+
"HRDisposeReference",
4142
]
4243

4344
def makeblacklisttypes(self):

Mac/Modules/htmlrender/htmlsupport.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ class MyObjectDefinition(GlobalObjectDefinition):
143143
## Output("if (v == Py_None) { *p_itself = NULL; return 1; }")
144144
## Output("if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);")
145145
## Output(" return 1; }")
146-
## def outputFreeIt(self, itselfname):
147-
## Output("DisposeDialog(%s);", itselfname)
146+
def outputFreeIt(self, itselfname):
147+
Output("HRDisposeReference(%s);", itselfname)
148148

149149
# Create the generator groups and link them
150150
module = MacModule('HtmlRender', 'Html', includestuff, finalstuff, initstuff)
@@ -160,6 +160,9 @@ class MyObjectDefinition(GlobalObjectDefinition):
160160
methods = []
161161
execfile("htmlgen.py")
162162

163+
f = Function(int, 'HRHTMLRenderingLibAvailable')
164+
functions.append(f)
165+
163166
# add the populated lists to the generator groups
164167
for f in functions: module.add(f)
165168
for f in methods: object.add(f)

0 commit comments

Comments
 (0)