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

Skip to content

Commit 07f1dfa

Browse files
committed
Blacklisting LSInit and LSTerm, which are deprecated. Partial fix for 853558.
1 parent c8de458 commit 07f1dfa

2 files changed

Lines changed: 2 additions & 32 deletions

File tree

Mac/Modules/launch/_Launchmodule.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,6 @@ LSItemInfoRecord_New(LSItemInfoRecord *it)
5757

5858
static PyObject *Launch_Error;
5959

60-
static PyObject *Launch_LSInit(PyObject *_self, PyObject *_args)
61-
{
62-
PyObject *_res = NULL;
63-
OSStatus _err;
64-
LSInitializeFlags inFlags;
65-
if (!PyArg_ParseTuple(_args, "l",
66-
&inFlags))
67-
return NULL;
68-
_err = LSInit(inFlags);
69-
if (_err != noErr) return PyMac_Error(_err);
70-
Py_INCREF(Py_None);
71-
_res = Py_None;
72-
return _res;
73-
}
74-
75-
static PyObject *Launch_LSTerm(PyObject *_self, PyObject *_args)
76-
{
77-
PyObject *_res = NULL;
78-
OSStatus _err;
79-
if (!PyArg_ParseTuple(_args, ""))
80-
return NULL;
81-
_err = LSTerm();
82-
if (_err != noErr) return PyMac_Error(_err);
83-
Py_INCREF(Py_None);
84-
_res = Py_None;
85-
return _res;
86-
}
87-
8860
static PyObject *Launch_LSCopyItemInfoForRef(PyObject *_self, PyObject *_args)
8961
{
9062
PyObject *_res = NULL;
@@ -347,10 +319,6 @@ static PyObject *Launch_LSOpenCFURLRef(PyObject *_self, PyObject *_args)
347319
}
348320

349321
static PyMethodDef Launch_methods[] = {
350-
{"LSInit", (PyCFunction)Launch_LSInit, 1,
351-
PyDoc_STR("(LSInitializeFlags inFlags) -> None")},
352-
{"LSTerm", (PyCFunction)Launch_LSTerm, 1,
353-
PyDoc_STR("() -> None")},
354322
{"LSCopyItemInfoForRef", (PyCFunction)Launch_LSCopyItemInfoForRef, 1,
355323
PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
356324
{"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,

Mac/Modules/launch/launchscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def writeinitialdefs(self):
4444

4545
def makeblacklistnames(self):
4646
return [
47+
"LSInit",
48+
"LSTerm",
4749
"kLSRequestAllInfo",
4850
"kLSRolesAll",
4951
]

0 commit comments

Comments
 (0)