comparison Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h @ 41:393d2da0722a

upgrade to Orthanc SDK 1.7.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 Jul 2020 14:34:59 +0200
parents b2bbb516056e
children 23f3099bed47
comparison
equal deleted inserted replaced
40:1b6af7a317bf 41:393d2da0722a
422 //PythonLock::RaiseException(module, OrthancPluginErrorCode_NullPointer); 422 //PythonLock::RaiseException(module, OrthancPluginErrorCode_NullPointer);
423 PyErr_SetString(PyExc_ValueError, "Invalid object"); 423 PyErr_SetString(PyExc_ValueError, "Invalid object");
424 return NULL; 424 return NULL;
425 } 425 }
426 426
427 const char* arg0 = NULL; 427 Py_buffer arg0;
428 unsigned long arg1 = 0; 428
429 429 if (!PyArg_ParseTuple(args, "s*", &arg0))
430 if (!PyArg_ParseTuple(args, "sk", &arg0, &arg1)) 430 {
431 { 431 // TODO => RAISE : https://stackoverflow.com/questions/60832317
432 // TODO => RAISE : https://stackoverflow.com/questions/60832317 432 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (1 arguments expected)");
433 PyErr_SetString(PyExc_TypeError, "Bad types for the arguments (2 arguments expected)"); 433 return NULL;
434 return NULL; 434 }
435 } 435 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0.buf, arg0.len);
436 OrthancPluginErrorCode code = OrthancPluginSendMultipartItem(OrthancPlugins::GetGlobalContext(), self->object_, arg0, arg1); 436 PyBuffer_Release(&arg0);
437
438 437
439 if (code == OrthancPluginErrorCode_Success) 438 if (code == OrthancPluginErrorCode_Success)
440 { 439 {
441 Py_INCREF(Py_None); 440 Py_INCREF(Py_None);
442 return Py_None; 441 return Py_None;