Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: Modules/_pickle.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/mmapmodule.c ('k') | Modules/posixmodule.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "Python.h" 1 #include "Python.h"
2 #include "structmember.h" 2 #include "structmember.h"
3 3
4 PyDoc_STRVAR(pickle_module_doc, 4 PyDoc_STRVAR(pickle_module_doc,
5 "Optimized C implementation for the Python pickle module."); 5 "Optimized C implementation for the Python pickle module.");
6 6
7 /* Bump this when new opcodes are added to the pickle protocol. */ 7 /* Bump this when new opcodes are added to the pickle protocol. */
8 enum { 8 enum {
9 HIGHEST_PROTOCOL = 3, 9 HIGHEST_PROTOCOL = 3,
10 DEFAULT_PROTOCOL = 3 10 DEFAULT_PROTOCOL = 3
(...skipping 6320 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 if (PyType_Ready(&PicklerMemoProxyType) < 0) 6331 if (PyType_Ready(&PicklerMemoProxyType) < 0)
6332 return NULL; 6332 return NULL;
6333 if (PyType_Ready(&UnpicklerMemoProxyType) < 0) 6333 if (PyType_Ready(&UnpicklerMemoProxyType) < 0)
6334 return NULL; 6334 return NULL;
6335 6335
6336 /* Create the module and add the functions. */ 6336 /* Create the module and add the functions. */
6337 m = PyModule_Create(&_picklemodule); 6337 m = PyModule_Create(&_picklemodule);
6338 if (m == NULL) 6338 if (m == NULL)
6339 return NULL; 6339 return NULL;
6340 6340
6341 Py_INCREF(&Pickler_Type);
6342 if (PyModule_AddObject(m, "Pickler", (PyObject *)&Pickler_Type) < 0) 6341 if (PyModule_AddObject(m, "Pickler", (PyObject *)&Pickler_Type) < 0)
6343 return NULL; 6342 return NULL;
6344 Py_INCREF(&Unpickler_Type);
6345 if (PyModule_AddObject(m, "Unpickler", (PyObject *)&Unpickler_Type) < 0) 6343 if (PyModule_AddObject(m, "Unpickler", (PyObject *)&Unpickler_Type) < 0)
6346 return NULL; 6344 return NULL;
6347 6345
6348 /* Initialize the exceptions. */ 6346 /* Initialize the exceptions. */
6349 PickleError = PyErr_NewException("_pickle.PickleError", NULL, NULL); 6347 PickleError = PyErr_NewException("_pickle.PickleError", NULL, NULL);
6350 if (PickleError == NULL) 6348 if (PickleError == NULL)
6351 return NULL; 6349 return NULL;
6352 PicklingError = \ 6350 PicklingError = \
6353 PyErr_NewException("_pickle.PicklingError", PickleError, NULL); 6351 PyErr_NewException("_pickle.PicklingError", PickleError, NULL);
6354 if (PicklingError == NULL) 6352 if (PicklingError == NULL)
6355 return NULL; 6353 return NULL;
6356 UnpicklingError = \ 6354 UnpicklingError = \
6357 PyErr_NewException("_pickle.UnpicklingError", PickleError, NULL); 6355 PyErr_NewException("_pickle.UnpicklingError", PickleError, NULL);
6358 if (UnpicklingError == NULL) 6356 if (UnpicklingError == NULL)
6359 return NULL; 6357 return NULL;
6360 6358
6361 if (PyModule_AddObject(m, "PickleError", PickleError) < 0) 6359 if (PyModule_AddObject(m, "PickleError", PickleError) < 0)
6362 return NULL; 6360 return NULL;
6363 if (PyModule_AddObject(m, "PicklingError", PicklingError) < 0) 6361 if (PyModule_AddObject(m, "PicklingError", PicklingError) < 0)
6364 return NULL; 6362 return NULL;
6365 if (PyModule_AddObject(m, "UnpicklingError", UnpicklingError) < 0) 6363 if (PyModule_AddObject(m, "UnpicklingError", UnpicklingError) < 0)
6366 return NULL; 6364 return NULL;
6367 6365
6368 if (initmodule() < 0) 6366 if (initmodule() < 0)
6369 return NULL; 6367 return NULL;
6370 6368
6371 return m; 6369 return m;
6372 } 6370 }
OLDNEW
« no previous file with comments | « Modules/mmapmodule.c ('k') | Modules/posixmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+