diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-08-11 14:27:48 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2020-08-19 09:12:14 -0600 |
commit | 8c226bf9b19a3b974bc63421918d068660ba506c (patch) | |
tree | 676d2a6b2aa47a43e02b651f05290a3e70607a4e /numpy/f2py/tests | |
parent | 00a45b4dca164105b50ba29e1735e96b573b639c (diff) | |
download | numpy-8c226bf9b19a3b974bc63421918d068660ba506c.tar.gz |
MAINT: Remove uses of PyString_FromString.
We no longer need to use the compatibility function after dropping
support for Python 2.7. In some cases unicode was the correct string
type rather than the bytes of the compatibility version and bugs in the
array `__complex__` and array `__array_interface__` methods have been
fixed by changing that.
Diffstat (limited to 'numpy/f2py/tests')
-rw-r--r-- | numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c index 0db33e714..3dadc137d 100644 --- a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c @@ -1,14 +1,9 @@ -/* File: wrapmodule.c - * This file is auto-generated with f2py (version:2_1330). - * Hand edited by Pearu. - * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, - * written by Pearu Peterson <pearu@cens.ioc.ee>. - * See http://cens.ioc.ee/projects/f2py2e/ - * Generation date: Fri Oct 21 22:41:12 2005 - * $Revision:$ - * $Date:$ - * Do not edit this file directly unless you know what you are doing!!! +/* + * This file was auto-generated with f2py (version:2_1330) and hand edited by + * Pearu for testing purposes. Do not edit this file unless you know what you + * are doing!!! */ + #ifdef __cplusplus extern "C" { #endif @@ -149,9 +144,9 @@ PyMODINIT_FUNC PyInit_test_array_from_pyobj_ext(void) { if (PyErr_Occurred()) Py_FatalError("can't initialize module wrap (failed to import numpy)"); d = PyModule_GetDict(m); - s = PyString_FromString("This module 'wrap' is auto-generated with f2py (version:2_1330).\nFunctions:\n" -" arr = call(type_num,dims,intent,obj)\n" -"."); + s = PyUnicode_FromString("This module 'wrap' is auto-generated with f2py (version:2_1330).\nFunctions:\n" + " arr = call(type_num,dims,intent,obj)\n" + "."); PyDict_SetItemString(d, "__doc__", s); wrap_error = PyErr_NewException ("wrap.error", NULL, NULL); Py_DECREF(s); |