-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add internal pycore_complexobject.h header file. Move _Py_c_xxx() functions and _PyComplex_FormatAdvancedWriter() function to this new header file.
- Loading branch information
Showing
8 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef Py_INTERNAL_COMPLEXOBJECT_H | ||
#define Py_INTERNAL_COMPLEXOBJECT_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifndef Py_BUILD_CORE | ||
# error "this header requires Py_BUILD_CORE define" | ||
#endif | ||
|
||
/* Operations on complex numbers from complexmodule.c */ | ||
|
||
PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex); | ||
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex); | ||
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex); | ||
PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex); | ||
PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex); | ||
PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex); | ||
PyAPI_FUNC(double) _Py_c_abs(Py_complex); | ||
|
||
/* Format the object based on the format_spec, as defined in PEP 3101 | ||
(Advanced String Formatting). */ | ||
extern int _PyComplex_FormatAdvancedWriter( | ||
_PyUnicodeWriter *writer, | ||
PyObject *obj, | ||
PyObject *format_spec, | ||
Py_ssize_t start, | ||
Py_ssize_t end); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // !Py_INTERNAL_COMPLEXOBJECT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters