Skip to content

Commit dede9c7

Browse files
CzarekCzarek
authored andcommitted
Removed deprecated comments.
1 parent 2f09ac5 commit dede9c7

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

cefpython/web_request.pyx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22
# License: New BSD License.
33
# Website: http://code.google.com/p/cefpython/
44

5-
# PyWebRequests are kept int a C++ map and not in a Python Dict,
6-
# as we do not want to increase references for them, the
7-
# deallocation will happen in PyRequest.__dealloc__(). We must
8-
# keep callbacks (OnStateChange and others) and they must be
9-
# callable from C++ code, thus we need to keep PyWebRequests
10-
# objects in some global scope, if we put PyWebRequests in a
11-
# Python Dict then we would never know of when PyWebRequest
12-
# global reference can be released, thus the memory for these
13-
# objects would live forever.
14-
# - using uintptr_t instead of void* as it resulted in compiler
15-
# crash
16-
# - Casting void* to python object example (see PyWebRequest.__dealloc__):
17-
# cdef void* a
18-
# cdef PyWebRequest b = <PyWebRequest>a
19-
# - todo: instead of the C++ map and __dealloc__, try using
20-
# WeakValueDictionary and cdef object __weakref__ on PyWebRequest,
21-
# see weak referencing:
22-
# http://docs.cython.org/src/reference/extension_types.html#weak-referencing
23-
#cdef cpp_map[int, PyObject*] g_pyWebRequests
24-
255
# TODO: temporarily removed weakref.WeakValueDictionary()
266
cdef object g_pyWebRequests = {}
277
cdef int g_webRequestMaxId = 0
@@ -69,9 +49,7 @@ cdef PyWebRequest CreatePyWebRequest(PyRequest request,
6949
cdef PyWebRequest GetPyWebRequest(int webRequestId):
7050
global g_pyWebRequests
7151
if webRequestId in g_pyWebRequests:
72-
# Debug("GetPyWebRequest(): found webRequestId = %s" % webRequestId)
7352
return g_pyWebRequests[webRequestId]
74-
# Debug("GetPyWebRequest(): not found webRequestId = %s" % webRequestId)
7553
return None
7654

7755
cdef class PyWebRequest:

0 commit comments

Comments
 (0)