diff --git a/bundles/pyml/pyml-current/py.ml b/bundles/pyml/pyml-current/py.ml index fc49bc42f705384d7089d37158b104b4b897a959..d33dcf77f0bd8a0726ddb9c749c6af1a7d1da166 100644 --- a/bundles/pyml/pyml-current/py.ml +++ b/bundles/pyml/pyml-current/py.ml @@ -36,12 +36,6 @@ external pyerr_fetch_internal: unit -> pyobject * pyobject * pyobject = "PyErr_Fetch_wrapper" external pystring_asstringandsize: pyobject -> string option = "PyString_AsStringAndSize_wrapper" -external pyobject_ascharbuffer: pyobject -> string option - = "PyObject_AsCharBuffer_wrapper" -external pyobject_asreadbuffer: pyobject -> string option - = "PyObject_AsReadBuffer_wrapper" -external pyobject_aswritebuffer: pyobject -> string option - = "PyObject_AsWriteBuffer_wrapper" external pylong_fromstring: string -> int -> pyobject * int = "PyLong_FromString_wrapper" external pycapsule_isvalid: Pytypes.pyobject -> string -> int @@ -1429,12 +1423,6 @@ module Object = struct let to_string item = String.to_string (str item) - let as_char_buffer obj = check_some (pyobject_ascharbuffer obj) - - let as_read_buffer obj = check_some (pyobject_asreadbuffer obj) - - let as_write_buffer obj = check_some (pyobject_aswritebuffer obj) - external reference_count: pyobject -> int = "pyrefcount" let repr_or_string repr v = diff --git a/bundles/pyml/pyml-current/py.mli b/bundles/pyml/pyml-current/py.mli index 19a4599ee1d46788fe526ef96c1fa5e2f2f71225..df509a0270053c26c18b6ab18165fb3aeb52b56f 100644 --- a/bundles/pyml/pyml-current/py.mli +++ b/bundles/pyml/pyml-current/py.mli @@ -239,18 +239,6 @@ module Object: sig We have [Py.Object.to_string o = Py.String.to_string (Py.Object.str o)]. *) - val as_char_buffer: t -> string - (** Wrapper for - {{:https://docs.python.org/3/c-api/objbuffer.html#c.PyObject_AsCharBuffer} PyObject_AsCharBuffer} *) - - val as_read_buffer: t -> string - (** Wrapper for - {{:https://docs.python.org/3/c-api/objbuffer.html#c.PyObject_AsReadBuffer} PyObject_AsReadBuffer} *) - - val as_write_buffer: t -> string - (** Wrapper for - {{:https://docs.python.org/3/c-api/objbuffer.html#c.PyObject_AsWriteBuffer} PyObject_AsWriteBuffer} *) - val reference_count: t -> int (** [reference_count o] returns the number of references to the Python object [o]. *) diff --git a/bundles/pyml/pyml-current/pycaml.ml b/bundles/pyml/pyml-current/pycaml.ml index 8c93cf4a488301f445e2a4ee2e6abac2dd479974..13b16aa83a67ccdb63b54609ff4b49cec27fb88e 100644 --- a/bundles/pyml/pyml-current/pycaml.ml +++ b/bundles/pyml/pyml-current/pycaml.ml @@ -347,12 +347,6 @@ let pyunicode_asunicode = Py.String.to_unicode let pyunicode_getsize = Py.String.length -let pyobject_ascharbuffer = Py.Object.as_char_buffer - -let pyobject_asreadbuffer = Py.Object.as_read_buffer - -let pyobject_aswritebuffer = Py.Object.as_write_buffer - let python () = Py.Run.interactive (); 0 diff --git a/bundles/pyml/pyml-current/pycaml.mli b/bundles/pyml/pyml-current/pycaml.mli index 85b5f83c696332f5e272581dd8720268a4df2f89..da800baccd0772432883e1f3559e5bb94eaf686f 100644 --- a/bundles/pyml/pyml-current/pycaml.mli +++ b/bundles/pyml/pyml-current/pycaml.mli @@ -758,9 +758,6 @@ val pyobject_size : pyobject -> int val pyobject_getitem : pyobject * pyobject -> pyobject val pyobject_setitem : pyobject * pyobject * pyobject -> int val pyobject_delitem : pyobject * pyobject -> int -val pyobject_ascharbuffer : pyobject -> string -val pyobject_asreadbuffer : pyobject -> string -val pyobject_aswritebuffer : pyobject -> string val pynumber_check : pyobject -> int val pynumber_add : pyobject * pyobject -> pyobject diff --git a/bundles/pyml/pyml-current/pyml_stubs.c b/bundles/pyml/pyml-current/pyml_stubs.c index 5158a0e4bd12e44fac2d372f77b2f23f2909cc14..cc10e8213e8be2ec8413a05c9144745d1a94b1db 100644 --- a/bundles/pyml/pyml-current/pyml_stubs.c +++ b/bundles/pyml/pyml-current/pyml_stubs.c @@ -195,12 +195,6 @@ static PyObject *Python__Py_FalseStruct; /* Buffer and size */ static int (*Python_PyString_AsStringAndSize) (PyObject *, char **, Py_ssize_t *); -static int (*Python_PyObject_AsCharBuffer) -(PyObject *, const char **, Py_ssize_t *); -static int (*Python_PyObject_AsReadBuffer) -(PyObject *, const void **, Py_ssize_t *); -static int (*Python_PyObject_AsWriteBuffer) -(PyObject *, void **, Py_ssize_t *); /* Length argument */ static PyObject *(*Python_PyLong_FromString)(const char *, const char **, int); @@ -684,9 +678,6 @@ py_load_library(value filename_ocaml, value debug_build_ocaml) resolve("PyObject_CallMethodObjArgs"); Python_PyErr_Fetch = resolve("PyErr_Fetch"); Python_PyErr_NormalizeException = resolve("PyErr_NormalizeException"); - Python_PyObject_AsCharBuffer = resolve("PyObject_AsCharBuffer"); - Python_PyObject_AsReadBuffer = resolve("PyObject_AsReadBuffer"); - Python_PyObject_AsWriteBuffer = resolve("PyObject_AsWriteBuffer"); if (version_major >= 3) { Python__Py_FalseStruct = resolve("_Py_FalseStruct"); Python_PyString_AsStringAndSize = resolve("PyBytes_AsStringAndSize"); @@ -1272,9 +1263,6 @@ pyml_wrap_ucs4_option_and_free(int32_t *buffer, bool free) } StringAndSize_wrapper(PyString_AsStringAndSize, char); -StringAndSize_wrapper(PyObject_AsCharBuffer, const char); -StringAndSize_wrapper(PyObject_AsReadBuffer, const void); -StringAndSize_wrapper(PyObject_AsWriteBuffer, void); static FILE * open_file(value file, const char *mode)