changeset 191:30ed49f2487f java-code-model

removed pointless function orthanc.CreateMemoryBuffer()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jul 2024 18:00:52 +0200
parents 0cb98433a382
children b0f096d2339e
files CodeAnalysis/CustomFunctions.json Sources/Autogenerated/orthanc.pyi Sources/Autogenerated/sdk_GlobalFunctions.impl.h
diffstat 3 files changed, 0 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/CodeAnalysis/CustomFunctions.json	Tue Jul 02 17:27:44 2024 +0200
+++ b/CodeAnalysis/CustomFunctions.json	Tue Jul 02 18:00:52 2024 +0200
@@ -1,20 +1,2 @@
 [
-  {
-    "c_function" : "OrthancPluginCreateMemoryBuffer",
-    "args" : [
-      {
-        "name" : "arg0",
-        "sdk_name" : "size",
-        "sdk_type" : "uint32_t"
-      }
-    ],
-    "documentation" : {
-      "args" : {
-        "size" : "Size of the memory buffer to be created"
-      },
-      "return" : "The newly allocated memory buffer",
-      "description" : [ "Create a new memory buffer managed by the Orthanc core" ]
-    },
-    "return_sdk_type" : "OrthancPluginMemoryBuffer *"
-  }
 ]
--- a/Sources/Autogenerated/orthanc.pyi	Tue Jul 02 17:27:44 2024 +0200
+++ b/Sources/Autogenerated/orthanc.pyi	Tue Jul 02 18:00:52 2024 +0200
@@ -1486,18 +1486,6 @@
       Image: The newly allocated image. It must be freed with OrthancPluginFreeImage().
     """
     ...
-# Create a new memory buffer managed by the Orthanc core
-def CreateMemoryBuffer(size: int) -> bytes:
-    """
-    Create a new memory buffer managed by the Orthanc core
-
-    Args:
-      size (int): Size of the memory buffer to be created
-
-    Returns:
-      bytes: The newly allocated memory buffer
-    """
-    ...
 # This function decodes one frame of a DICOM image that is stored in a memory buffer
 def DecodeDicomImage(buffer: bytes, frame_index: int) -> Image:
     """
--- a/Sources/Autogenerated/sdk_GlobalFunctions.impl.h	Tue Jul 02 17:27:44 2024 +0200
+++ b/Sources/Autogenerated/sdk_GlobalFunctions.impl.h	Tue Jul 02 18:00:52 2024 +0200
@@ -426,36 +426,6 @@
   }
 }
 
-static PyObject* sdk_OrthancPluginCreateMemoryBuffer(PyObject* module, PyObject* args)
-{
-  PythonLock::LogCall("Calling Python global function: OrthancPluginCreateMemoryBuffer()");
-
-  unsigned long arg0 = 0;
-
-  if (!PyArg_ParseTuple(args, "k", &arg0))
-  {
-    PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
-    return NULL;
-  }
-
-  OrthancPlugins::MemoryBuffer buffer;
-  OrthancPluginErrorCode code;
-  {
-    PythonThreadsAllower allower;
-    code = OrthancPluginCreateMemoryBuffer(OrthancPlugins::GetGlobalContext(), *buffer, arg0);
-  }
-  
-  if (code == OrthancPluginErrorCode_Success)
-  {
-    return PyBytes_FromStringAndSize(buffer.GetData(), buffer.GetSize());
-  }
-  else
-  {
-    PythonLock::RaiseException(code);
-    return NULL;  
-  }
-}
-
 static PyObject* sdk_OrthancPluginDecodeDicomImage(PyObject* module, PyObject* args)
 {
   PythonLock::LogCall("Calling Python global function: OrthancPluginDecodeDicomImage()");
@@ -1938,8 +1908,6 @@
     "Generated from C function OrthancPluginCreateFindMatcher()" },
   { "CreateImage", sdk_OrthancPluginCreateImage, METH_VARARGS,
     "Generated from C function OrthancPluginCreateImage()" },
-  { "CreateMemoryBuffer", sdk_OrthancPluginCreateMemoryBuffer, METH_VARARGS,
-    "Generated from C function OrthancPluginCreateMemoryBuffer()" },
   { "DecodeDicomImage", sdk_OrthancPluginDecodeDicomImage, METH_VARARGS,
     "Generated from C function OrthancPluginDecodeDicomImage()" },
   { "DicomBufferToJson", sdk_OrthancPluginDicomBufferToJson, METH_VARARGS,