mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	
							parent
							
								
									60c2266afe
								
							
						
					
					
						commit
						29e49d6394
					
				
					 3 changed files with 11 additions and 1 deletions
				
			
		| 
						 | 
					@ -542,6 +542,7 @@ Soren Larsen
 | 
				
			||||||
Piers Lauder
 | 
					Piers Lauder
 | 
				
			||||||
Ben Laurie
 | 
					Ben Laurie
 | 
				
			||||||
Simon Law
 | 
					Simon Law
 | 
				
			||||||
 | 
					Julia Lawall
 | 
				
			||||||
Chris Lawrence
 | 
					Chris Lawrence
 | 
				
			||||||
Brian Leair
 | 
					Brian Leair
 | 
				
			||||||
James Lee
 | 
					James Lee
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,9 @@ What's New in Python 3.2.4
 | 
				
			||||||
Core and Builtins
 | 
					Core and Builtins
 | 
				
			||||||
-----------------
 | 
					-----------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Issue #15394: An issue in PyModule_Create that caused references to
 | 
				
			||||||
 | 
					  be leaked on some error paths has been fixed.  Patch by Julia Lawall.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Issue #15368: An issue that caused bytecode generation to be
 | 
					- Issue #15368: An issue that caused bytecode generation to be
 | 
				
			||||||
  non-deterministic when using randomized hashing (-R) has been fixed.
 | 
					  non-deterministic when using randomized hashing (-R) has been fixed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,8 +117,10 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
 | 
				
			||||||
    d = PyModule_GetDict((PyObject*)m);
 | 
					    d = PyModule_GetDict((PyObject*)m);
 | 
				
			||||||
    if (module->m_methods != NULL) {
 | 
					    if (module->m_methods != NULL) {
 | 
				
			||||||
        n = PyUnicode_FromString(name);
 | 
					        n = PyUnicode_FromString(name);
 | 
				
			||||||
        if (n == NULL)
 | 
					        if (n == NULL) {
 | 
				
			||||||
 | 
					            Py_DECREF(m);
 | 
				
			||||||
            return NULL;
 | 
					            return NULL;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        for (ml = module->m_methods; ml->ml_name != NULL; ml++) {
 | 
					        for (ml = module->m_methods; ml->ml_name != NULL; ml++) {
 | 
				
			||||||
            if ((ml->ml_flags & METH_CLASS) ||
 | 
					            if ((ml->ml_flags & METH_CLASS) ||
 | 
				
			||||||
                (ml->ml_flags & METH_STATIC)) {
 | 
					                (ml->ml_flags & METH_STATIC)) {
 | 
				
			||||||
| 
						 | 
					@ -126,16 +128,19 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
 | 
				
			||||||
                                "module functions cannot set"
 | 
					                                "module functions cannot set"
 | 
				
			||||||
                                " METH_CLASS or METH_STATIC");
 | 
					                                " METH_CLASS or METH_STATIC");
 | 
				
			||||||
                Py_DECREF(n);
 | 
					                Py_DECREF(n);
 | 
				
			||||||
 | 
					                Py_DECREF(m);
 | 
				
			||||||
                return NULL;
 | 
					                return NULL;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            v = PyCFunction_NewEx(ml, (PyObject*)m, n);
 | 
					            v = PyCFunction_NewEx(ml, (PyObject*)m, n);
 | 
				
			||||||
            if (v == NULL) {
 | 
					            if (v == NULL) {
 | 
				
			||||||
                Py_DECREF(n);
 | 
					                Py_DECREF(n);
 | 
				
			||||||
 | 
					                Py_DECREF(m);
 | 
				
			||||||
                return NULL;
 | 
					                return NULL;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (PyDict_SetItemString(d, ml->ml_name, v) != 0) {
 | 
					            if (PyDict_SetItemString(d, ml->ml_name, v) != 0) {
 | 
				
			||||||
                Py_DECREF(v);
 | 
					                Py_DECREF(v);
 | 
				
			||||||
                Py_DECREF(n);
 | 
					                Py_DECREF(n);
 | 
				
			||||||
 | 
					                Py_DECREF(m);
 | 
				
			||||||
                return NULL;
 | 
					                return NULL;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            Py_DECREF(v);
 | 
					            Py_DECREF(v);
 | 
				
			||||||
| 
						 | 
					@ -146,6 +151,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
 | 
				
			||||||
        v = PyUnicode_FromString(module->m_doc);
 | 
					        v = PyUnicode_FromString(module->m_doc);
 | 
				
			||||||
        if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
 | 
					        if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
 | 
				
			||||||
            Py_XDECREF(v);
 | 
					            Py_XDECREF(v);
 | 
				
			||||||
 | 
					            Py_DECREF(m);
 | 
				
			||||||
            return NULL;
 | 
					            return NULL;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        Py_DECREF(v);
 | 
					        Py_DECREF(v);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue