Mercurial > cpython-lru_cache-weakref
comparison Python/modsupport.c @ 12:36a220d3731a legacy-trunk
Move err_badarg() and err_nomme() to errors.c.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 14 Oct 1990 20:02:48 +0000 |
| parents | fc6fcd7df4f7 |
| children | a6934380c6e7 |
comparison
equal
deleted
inserted
replaced
| 11:bcea6c822906 | 12:36a220d3731a |
|---|---|
| 56 DECREF(m); | 56 DECREF(m); |
| 57 return m; /* Yes, it still exists, in sys.modules... */ | 57 return m; /* Yes, it still exists, in sys.modules... */ |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| 61 /* Convenience functions to set a type error exception and return 0 */ | |
| 62 | |
| 63 int | |
| 64 err_badarg() | |
| 65 { | |
| 66 err_setstr(TypeError, "illegal argument type for built-in function"); | |
| 67 return 0; | |
| 68 } | |
| 69 | |
| 70 object * | |
| 71 err_nomem() | |
| 72 { | |
| 73 err_setstr(MemoryError, "in built-in function"); | |
| 74 return NULL; | |
| 75 } | |
| 76 | |
| 77 /* Argument list handling tools. | 61 /* Argument list handling tools. |
| 78 All return 1 for success, or call err_set*() and return 0 for failure */ | 62 All return 1 for success, or call err_set*() and return 0 for failure */ |
| 79 | 63 |
| 80 int | 64 int |
| 81 getnoarg(v) | 65 getnoarg(v) |
