File tree 4 files changed +26
-7
lines changed
4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 40
40
with :
41
41
path : |
42
42
./_spidermonkey_install/*
43
- key : spidermonkey115.1 .0-${{ runner.os }}-${{ runner.arch }}
43
+ key : spidermonkey115.7 .0-${{ runner.os }}-${{ runner.arch }}
44
44
lookup-only : true # skip download
45
45
- name : Setup XCode
46
46
if : ${{ matrix.os == 'macos-13' && steps.cache-spidermonkey.outputs.cache-hit != 'true' }}
60
60
with :
61
61
path : |
62
62
./_spidermonkey_install/*
63
- key : spidermonkey115.1 .0-${{ runner.os }}-${{ runner.arch }}
63
+ key : spidermonkey115.7 .0-${{ runner.os }}-${{ runner.arch }}
64
64
lookup-only : true # skip download
65
65
- name : Install dependencies
66
66
if : ${{ steps.cache-spidermonkey.outputs.cache-hit != 'true' }}
@@ -141,7 +141,7 @@ jobs:
141
141
with :
142
142
path : |
143
143
./_spidermonkey_install/*
144
- key : spidermonkey115.1 .0-${{ runner.os }}-${{ runner.arch }}
144
+ key : spidermonkey115.7 .0-${{ runner.os }}-${{ runner.arch }}
145
145
fail-on-cache-miss : true # SpiderMonkey is expected to be cached in its dedicated job
146
146
- name : Build pminit
147
147
run : |
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def run_cmake_build():
40
40
if platform .system () == "Windows" :
41
41
execute ("cmake .. -T ClangCL" , cwd = BUILD_DIR ) # use Clang/LLVM toolset for Visual Studio
42
42
else :
43
- execute ("cmake .." , cwd = BUILD_DIR )
43
+ execute ("cmake .. -DPYTHON_INCLUDE_DIR=$(python -c 'import sysconfig; print(sysconfig.get_path('include'))') -DPYTHON_LIBRARY=$(python -c 'import sysconfig; print(sysconfig.get_config_var('LIBDIR'))') " , cwd = BUILD_DIR )
44
44
execute (f"cmake --build . -j{ CPUS } --config Release" , cwd = BUILD_DIR )
45
45
46
46
def copy_artifacts ():
Original file line number Diff line number Diff line change @@ -167,8 +167,18 @@ bool PyDictProxyHandler::getOwnEnumerablePropertyKeys(
167
167
return this ->ownPropertyKeys (cx, proxy, props);
168
168
}
169
169
170
- // @TODO (Caleb Aikens) implement this
171
- void PyDictProxyHandler::finalize (JS::GCContext *gcx, JSObject *proxy) const {}
170
+ // TODO not needed at this time since only called as part of cleanup function's js::DestroyContext call which is only called at cpython exit Py_AtExit in PyInit_pythonmonkey
171
+ // put in some combination of the commented-out code below
172
+ void PyDictProxyHandler::finalize (JS::GCContext *gcx, JSObject *proxy) const {
173
+ /* PyThreadState *state = PyThreadState_Get();
174
+ PyThreadState *state = PyGILState_GetThisThreadState();
175
+ if (state) {
176
+ PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
177
+ PyGILState_STATE state = PyGILState_Ensure();
178
+ Py_DECREF(self);
179
+ PyGILState_Release(state);
180
+ }*/
181
+ }
172
182
173
183
bool PyDictProxyHandler::defineProperty (JSContext *cx, JS::HandleObject proxy,
174
184
JS::HandleId id,
Original file line number Diff line number Diff line change @@ -2098,8 +2098,17 @@ bool PyListProxyHandler::getOwnPropertyDescriptor(
2098
2098
return true ;
2099
2099
}
2100
2100
2101
+ // TODO not needed at this time since only called as part of cleanup function's js::DestroyContext call which is only called at cpython exit Py_AtExit in PyInit_pythonmonkey
2102
+ // put in some combination of the commented-out code below
2101
2103
void PyListProxyHandler::finalize (JS::GCContext *gcx, JSObject *proxy) const {
2102
- JS::SetReservedSlot (proxy, PyObjectSlot, JS::PrivateValue (nullptr ));
2104
+ /* PyThreadState *state = PyThreadState_Get();
2105
+ PyThreadState *state = PyGILState_GetThisThreadState();
2106
+ if (state) {
2107
+ PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
2108
+ PyGILState_STATE state = PyGILState_Ensure();
2109
+ Py_DECREF(self);
2110
+ PyGILState_Release(state);
2111
+ }*/
2103
2112
}
2104
2113
2105
2114
bool PyListProxyHandler::defineProperty (
You can’t perform that action at this time.
0 commit comments