summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_complexobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_complexobject.h')
-rw-r--r--Include/internal/pycore_complexobject.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Include/internal/pycore_complexobject.h b/Include/internal/pycore_complexobject.h
new file mode 100644
index 0000000..fb344b7
--- /dev/null
+++ b/Include/internal/pycore_complexobject.h
@@ -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