Lines Matching defs:shared
98 _sharedns *shared = PyMem_NEW(_sharedns, 1);
99 if (shared == NULL) {
103 shared->len = len;
104 shared->items = PyMem_NEW(struct _sharednsitem, len);
105 if (shared->items == NULL) {
107 PyMem_Free(shared);
110 return shared;
114 _sharedns_free(_sharedns *shared)
116 for (Py_ssize_t i=0; i < shared->len; i++) {
117 _sharednsitem_clear(&shared->items[i]);
119 PyMem_Free(shared->items);
120 PyMem_Free(shared);
134 _sharedns *shared = _sharedns_new(len);
135 if (shared == NULL) {
144 if (_sharednsitem_init(&shared->items[i], key, value) != 0) {
149 _sharedns_free(shared);
152 return shared;
156 _sharedns_apply(_sharedns *shared, PyObject *ns)
158 for (Py_ssize_t i=0; i < shared->len; i++) {
159 if (_sharednsitem_apply(&shared->items[i], ns) != 0) {
1864 _sharedns *shared, _sharedexception **exc)
1882 if (shared != NULL) {
1883 if (_sharedns_apply(shared, ns) != 0) {
1929 _sharedns *shared = _get_shared_ns(shareables);
1930 if (shared == NULL && PyErr_Occurred()) {
1945 int result = _run_script(interp, codestr, shared, &exc);
1958 // We were unable to allocate a shared exception.
1962 if (shared != NULL) {
1963 _sharedns_free(shared);
2160 static char *kwlist[] = {"id", "script", "shared", NULL};
2162 PyObject *shared = NULL;
2165 &id, &code, &shared)) {
2188 if (_run_script_in_interpreter(interp, codestr, shared) != 0) {
2195 "run_string(id, script, shared)\n\
2222 Return True if the object's data may be shared between interpreters and\n\